PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.17.1
Independent Analytics – WordPress Analytics Plugin v1.17.1
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
index.php
136 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"
22 class="iawp-button purple">
23 <?php esc_html_e('Create your first campaign', 'iawp'); ?>
24 </a>
25 </p>
26 </div>
27 <?php endif; ?>
28
29 <?php else: ?>
30 <!-- Some rows -->
31 <?php foreach ($rows as $index => $row): ?>
32 <?php $class = $table_name == 'views' && $row->is_deleted() ? 'row deleted' : 'row'; ?>
33 <div class="<?php echo esc_attr($class); ?>" <?php echo $this->row_data_attributes($row); ?>>
34 <?php foreach ($all_columns as $column): ?>
35 <?php $class = $column->visible() ? 'cell' : 'cell hide'; ?>
36 <div class="<?php echo esc_attr($class); ?>"
37 data-column="<?php echo esc_attr($column->id()); ?>"
38 data-test-visibility="<?php echo $column->visible() ? 'visible' : 'hidden'; ?>"
39 >
40 <div class="row-number"><?php echo $index + 1; ?></div>
41 <span class="cell-content"><?php echo $this->cell_content($row, $column->id()); ?></span>
42 <span class="animator"></span>
43 </div>
44 <?php endforeach ?>
45 </div>
46 <?php endforeach; ?>
47 <?php endif; ?>
48 </div>
49 <?php $this->stop() ?>
50
51 <?php $this->start('table') ?>
52 <div id='data-table'
53 class='data-table'
54 data-table-name='<?php echo esc_attr($table_name); ?>'
55 data-columns='<?php echo \IAWP\Security::json_encode($all_columns) ?>'
56 data-column-count='<?php echo count($all_columns); ?>'
57 style='--columns: <?php echo absint($visible_columns); ?>'
58 >
59
60 <!-- Header -->
61 <div id="columns" class="columns">
62 <div class="row"
63 data-controller="sort"
64 >
65 <?php foreach ($all_columns as $column): ?>
66 <?php $cell_class = $column->visible() ? 'cell' : 'cell hide'; ?>
67 <div class="<?php echo esc_attr($cell_class); ?>"
68 data-column="<?php echo esc_attr($column->id()); ?>"
69 data-test-visibility="<?php echo $column->visible() ? 'visible' : 'hidden'; ?>"
70 >
71 <button class="sort-button"
72 data-sort-target="sortButton"
73 data-sort-direction="<?php echo $column->id() === $opts->sort_by() ? $opts->sort_direction() : '' ?>"
74 data-default-sort-direction="<?php echo $column->sort_direction() ?>"
75 data-sort-column="<?php echo esc_attr($column->id()); ?>"
76 data-action="sort#sortByColumn"
77 >
78 <div class="row-number"></div>
79 <span class="name"><?php echo esc_html($column->label()); ?></span>
80 <span class="dashicons dashicons-arrow-right"></span>
81 <span class="dashicons dashicons-arrow-up"></span>
82 <span class="dashicons dashicons-arrow-down"></span>
83 <div class="animator"></div>
84 </button>
85 </div>
86 <?php endforeach ?>
87 </div>
88 </div>
89
90 <!-- Rows -->
91 <?php if ($render_skeleton) : ?>
92 <div id="rows" class="rows rendering">
93 <?php foreach (range(1, $page_size) as $index): ?>
94 <div class="row">
95 <?php foreach ($all_columns as $column): ?>
96 <?php $class = $column->visible() ? 'cell' : 'cell hide'; ?>
97 <div class="<?php echo esc_attr($class); ?>"
98 data-column="<?php echo esc_attr($column->id()); ?>"
99 data-test-visibility="<?php echo $column->visible() ? 'visible' : 'hidden'; ?>"
100 >
101 <div class="row-number"></div>
102 <span class="cell-content">
103 <span class="skeleton-loader"></span>
104 </span>
105 <span class="animator"></span>
106 </div>
107 <?php endforeach ?>
108 </div>
109 <?php endforeach ?>
110 </div>
111 <?php else: ?>
112 <?php echo $this->section('rows') ?>
113 <?php endif; ?>
114 </div>
115
116 <div class="pagination">
117 <button id="pagination-button" class="iawp-button purple"
118 data-report-target="loadMore"
119 data-action="report#loadMore"
120 >
121 <span class="disabled-button-text">
122 <?php esc_html_e('Showing All Rows', 'iawp'); ?>
123 </span>
124 <span class="enabled-button-text">
125 <?php printf(esc_html__('Load Next %d Rows', 'iawp'), absint($page_size)); ?>
126 </span>
127 </button>
128 </div>
129 <?php $this->stop() ?>
130
131 <?php if ($just_rows == true): ?>
132 <?php echo $this->section('rows') ?>
133 <?php else: ?>
134 <?php echo $this->section('table') ?>
135 <?php endif; ?>
136