PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.14
Independent Analytics – WordPress Analytics Plugin v1.14
2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / templates / table / index.php
independent-analytics / templates / table Last commit date
index.php 3 years ago rows.php 3 years ago
index.php
134 lines
1 <?php $this->start('rows') ?>
2 <div id="rows" class="rows">
3 <?php if ($row_count == 0): ?>
4 <!-- No rows -->
5 <?php if ($table_name == 'views'): ?>
6 <p id="data-error"
7 class="data-error"><?php esc_html_e('No views found', 'iawp'); ?></p>
8 <?php elseif ($table_name == 'referrers'): ?>
9 <p id="data-error"
10 class="data-error"><?php esc_html_e('No referrers found', 'iawp'); ?></p>
11 <?php elseif ($table_name == 'geo'): ?>
12 <p id="data-error"
13 class="data-error"><?php esc_html_e('No geographic data found', 'iawp'); ?></p>
14 <?php elseif ($table_name == 'campaigns'): ?>
15 <div class="data-error">
16
17 <p>
18 <?php esc_html_e('No campaign data found', 'iawp'); ?>
19 </p>
20 <p>
21 <a href="?page=independent-analytics&tab=campaign-builder" class="iawp-button purple">
22 <?php esc_html_e('Create your first campaign', 'iawp'); ?>
23 </a>
24 </p>
25 </div>
26 <?php endif; ?>
27
28 <?php else: ?>
29 <!-- Some rows -->
30 <?php foreach ($rows as $index => $row): ?>
31 <?php $class = $table_name == 'views' && $row->is_deleted() ? 'row deleted' : 'row'; ?>
32 <div class="<?php echo esc_attr($class); ?>" <?php echo $this->row_data_attributes($row); ?>>
33 <?php foreach ($all_columns as $id => $name): ?>
34 <?php $class = in_array($id, $columns) ? 'cell' : 'cell hide'; ?>
35 <div class="<?php echo esc_attr($class); ?>"
36 data-column="<?php echo esc_attr($id); ?>"
37 data-test-visibility="<?php echo in_array($id, $columns) ? 'visible' : 'hidden'; ?>"
38 >
39 <div class="row-number"><?php echo $index + 1; ?></div>
40 <span class="cell-content"><?php echo $this->cell_content($row, $id); ?></span>
41 <span class="animator"></span>
42 </div>
43 <?php endforeach ?>
44 </div>
45 <?php endforeach; ?>
46 <?php endif; ?>
47 </div>
48 <?php $this->stop() ?>
49
50 <?php $this->start('table') ?>
51 <div id='data-table'
52 class='data-table'
53 data-table-name='<?php echo esc_attr($table_name); ?>'
54 data-columns='<?php echo \IAWP\Security::json_encode($columns) ?>'
55 data-column-count='<?php echo count($columns); ?>'
56 >
57
58 <!-- Header -->
59 <div id="columns" class="columns">
60 <div class="row"
61 data-controller="sort"
62 >
63 <?php foreach ($all_columns as $id => $name): ?>
64 <?php $cell_class = in_array($id, $columns) ? 'cell' : 'cell hide'; ?>
65 <div class="<?php echo esc_attr($cell_class); ?>"
66 data-column="<?php echo esc_attr($id); ?>"
67 data-test-visibility="<?php echo in_array($id, $columns) ? 'visible' : 'hidden'; ?>"
68 >
69 <button class="sort-button"
70 data-sort-target="sortButton"
71 data-sort-direction="<?php echo $id === $opts->sort_by() ? $opts->sort_direction() : '' ?>"
72 data-default-sort-direction="<?php echo in_array($id, ['views', 'visitors']) ? 'desc' : 'asc' ?>"
73 data-sort-column="<?php echo esc_attr($id); ?>"
74 data-action="sort#sortByColumn"
75 >
76 <div class="row-number"></div>
77 <span class="name"><?php echo esc_html($name); ?></span>
78 <span class="dashicons dashicons-arrow-right"></span>
79 <span class="dashicons dashicons-arrow-up"></span>
80 <span class="dashicons dashicons-arrow-down"></span>
81 <div class="animator"></div>
82 </button>
83 </div>
84 <?php endforeach ?>
85 </div>
86 </div>
87
88 <!-- Rows -->
89 <?php if ($render_skeleton) : ?>
90 <div id="rows" class="rows rendering">
91 <?php foreach (range(1, $page_size) as $index): ?>
92 <div class="row">
93 <?php foreach ($all_columns as $id => $name): ?>
94 <?php $class = in_array($id, $columns) ? 'cell' : 'cell hide'; ?>
95 <div class="<?php echo esc_attr($class); ?>"
96 data-column="<?php echo esc_attr($id); ?>"
97 data-test-visibility="<?php echo in_array($id, $columns) ? 'visible' : 'hidden'; ?>"
98 >
99 <div class="row-number"></div>
100 <span class="cell-content">
101 <span class="skeleton-loader"></span>
102 </span>
103 <span class="animator"></span>
104 </div>
105 <?php endforeach ?>
106 </div>
107 <?php endforeach ?>
108 </div>
109 <?php else: ?>
110 <?php echo $this->section('rows') ?>
111 <?php endif; ?>
112 </div>
113
114 <div class="pagination">
115 <button id="pagination-button" class="iawp-button purple"
116 data-report-target="loadMore"
117 data-action="report#loadMore"
118 >
119 <span class="disabled-button-text">
120 <?php esc_html_e('Showing All Rows', 'iawp'); ?>
121 </span>
122 <span class="enabled-button-text">
123 <?php printf(esc_html__('Load Next %d Rows', 'iawp'), absint($page_size)); ?>
124 </span>
125 </button>
126 </div>
127 <?php $this->stop() ?>
128
129 <?php if ($just_rows == true): ?>
130 <?php echo $this->section('rows') ?>
131 <?php else: ?>
132 <?php echo $this->section('table') ?>
133 <?php endif; ?>
134