PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.23.0
Independent Analytics – WordPress Analytics Plugin v1.23.0
2.15.5 2.15.4 2.15.3 2.15.2 2.15.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
138 lines
1 <?php $this->start('rows') ?>
2 <div id="iawp-rows" class="iawp-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() ? 'iawp-row deleted' : 'iawp-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 class="data-table-container">
53 <div id='data-table'
54 class='data-table'
55 data-table-name='<?php echo esc_attr($table_name); ?>'
56 data-columns='<?php echo \IAWP\Utils\Security::json_encode($all_columns) ?>'
57 data-column-count='<?php echo count($all_columns); ?>'
58 style="margin: 2px; --columns: <?php echo absint($visible_column_count); ?>; --columns-mobile: <?php echo absint($visible_column_count - 1); ?>"
59 >
60
61 <!-- Header -->
62 <div id="columns" class="columns">
63 <div class="iawp-row"
64 data-controller="sort"
65 >
66 <?php foreach ($all_columns as $column): ?>
67 <?php $cell_class = $column->visible() ? 'cell' : 'cell hide'; ?>
68 <div class="<?php echo esc_attr($cell_class); ?>"
69 data-column="<?php echo esc_attr($column->id()); ?>"
70 data-test-visibility="<?php echo $column->visible() ? 'visible' : 'hidden'; ?>"
71 >
72 <button class="sort-button"
73 data-sort-target="sortButton"
74 data-sort-direction="<?php echo $column->id() === $opts->sort_by() ? $opts->sort_direction() : '' ?>"
75 data-default-sort-direction="<?php echo $column->sort_direction() ?>"
76 data-sort-column="<?php echo esc_attr($column->id()); ?>"
77 data-action="sort#sortByColumn"
78 >
79 <div class="row-number"></div>
80 <span class="name"><?php echo esc_html($column->label()); ?></span>
81 <span class="dashicons dashicons-arrow-right"></span>
82 <span class="dashicons dashicons-arrow-up"></span>
83 <span class="dashicons dashicons-arrow-down"></span>
84 <div class="animator"></div>
85 </button>
86 </div>
87 <?php endforeach ?>
88 </div>
89 </div>
90
91 <!-- Rows -->
92 <?php if ($render_skeleton) : ?>
93 <div id="iawp-rows" class="iawp-rows rendering">
94 <?php foreach (range(1, $page_size) as $index): ?>
95 <div class="iawp-row">
96 <?php foreach ($all_columns as $column): ?>
97 <?php $class = $column->visible() ? 'cell' : 'cell hide'; ?>
98 <div class="<?php echo esc_attr($class); ?>"
99 data-column="<?php echo esc_attr($column->id()); ?>"
100 data-test-visibility="<?php echo $column->visible() ? 'visible' : 'hidden'; ?>"
101 >
102 <div class="row-number"></div>
103 <span class="cell-content">
104 <span class="skeleton-loader"></span>
105 </span>
106 <span class="animator"></span>
107 </div>
108 <?php endforeach ?>
109 </div>
110 <?php endforeach ?>
111 </div>
112 <?php else: ?>
113 <?php echo $this->section('rows') ?>
114 <?php endif; ?>
115 </div>
116 </div>
117
118 <div class="pagination">
119 <button id="pagination-button" class="iawp-button purple"
120 data-report-target="loadMore"
121 data-action="report#loadMore"
122 >
123 <span class="disabled-button-text">
124 <?php esc_html_e('Showing All Rows', 'iawp'); ?>
125 </span>
126 <span class="enabled-button-text">
127 <?php printf(esc_html__('Load Next %d Rows', 'iawp'), absint($page_size)); ?>
128 </span>
129 </button>
130 </div>
131 <?php $this->stop() ?>
132
133 <?php if ($just_rows == true): ?>
134 <?php echo $this->section('rows') ?>
135 <?php else: ?>
136 <?php echo $this->section('table') ?>
137 <?php endif; ?>
138