group-select.blade.php
11 months ago
rows.blade.php
11 months ago
table-toolbar.blade.php
2 years ago
table.blade.php
11 months ago
rows.blade.php
80 lines
| 1 | @php /** @var \IAWP\Tables\Table $table */ @endphp |
| 2 | |
| 3 | <div id="iawp-rows" class="iawp-rows" data-number-of-shown-rows="<?php echo esc_attr($number_of_shown_rows) ?>"> |
| 4 | <!-- Empty table message --><?php |
| 5 | if($number_of_shown_rows === 0) : |
| 6 | if ($table->id() === 'views') : ?> |
| 7 | <p id="data-error" class="data-error"> |
| 8 | <?php esc_html_e('No views found', 'independent-analytics'); ?> |
| 9 | </p><?php |
| 10 | elseif ($table->id() === 'referrers') : ?> |
| 11 | <p id="data-error" class="data-error"> |
| 12 | <?php esc_html_e('No referrers found', 'independent-analytics'); ?> |
| 13 | </p><?php |
| 14 | elseif ($table->id() === 'geo') : ?> |
| 15 | <p id="data-error" class="data-error"> |
| 16 | <?php esc_html_e('No geographic data found', 'independent-analytics'); ?> |
| 17 | </p><?php |
| 18 | elseif ($table->id() === 'devices') : ?> |
| 19 | <p id="data-error" class="data-error"> |
| 20 | <?php esc_html_e('No device data found', 'independent-analytics'); ?> |
| 21 | </p><?php |
| 22 | elseif ($table->id() === 'campaigns') : ?> |
| 23 | <div class="data-error"> |
| 24 | <p> |
| 25 | <?php esc_html_e('No campaign data found', 'independent-analytics'); ?> |
| 26 | </p><?php |
| 27 | if (!$has_campaigns) : ?> |
| 28 | <p> |
| 29 | <a href="?page=independent-analytics-campaign-builder" class="iawp-button purple"> |
| 30 | <?php esc_html_e('Create your first campaign', 'independent-analytics'); ?> |
| 31 | </a> |
| 32 | </p><?php |
| 33 | endif; ?> |
| 34 | </div><?php |
| 35 | elseif ($table->id() === 'clicks') : ?> |
| 36 | <div class="data-error"> |
| 37 | <p> |
| 38 | <?php esc_html_e('No click data found', 'independent-analytics'); ?> |
| 39 | </p><?php |
| 40 | if (!$has_campaigns) : ?> |
| 41 | <p> |
| 42 | <a href="?page=independent-analytics-click-tracking" class="iawp-button purple"> |
| 43 | <?php esc_html_e('Edit your tracked links', 'independent-analytics'); ?> |
| 44 | </a> |
| 45 | </p><?php |
| 46 | endif; ?> |
| 47 | </div><?php |
| 48 | endif; |
| 49 | endif; |
| 50 | |
| 51 | if ($number_of_shown_rows > 0) : |
| 52 | foreach ($rows as $index => $row) : |
| 53 | $class = $table->id() === 'views' && $row->is_deleted() ? 'iawp-row deleted' : 'iawp-row'; ?> |
| 54 | <div class="<?php echo esc_attr($class); ?>" <?php echo $table->get_row_data_attributes($row); ?>><?php |
| 55 | foreach ($all_columns as $column) : |
| 56 | $class = $column->is_visible() ? 'cell' : 'cell hide'; ?> |
| 57 | <div class="<?php echo esc_attr($class); ?>" |
| 58 | data-column="<?php echo esc_attr($column->id()); ?>" |
| 59 | data-test-visibility="<?php echo $column->is_visible() ? 'visible' : 'hidden'; ?>" |
| 60 | > |
| 61 | <div class="row-number"> |
| 62 | <span><?php echo $index + 1; ?></span> |
| 63 | <?php if($is_pro): ?> |
| 64 | <button class="open-examiner-button" |
| 65 | data-action="report#showExaminer" |
| 66 | data-url="<?php echo esc_url($row->examiner_url()); ?>" |
| 67 | data-title="<?php echo esc_html($row->examiner_title()); ?>" |
| 68 | > |
| 69 | <span class="dashicons dashicons-search"></span> |
| 70 | </button> |
| 71 | <?php endif; ?> |
| 72 | </div> |
| 73 | <span class="cell-content"><?php echo wp_kses_post($table->get_cell_content($row, $column)); ?></span> |
| 74 | <span class="animator"></span> |
| 75 | </div><?php |
| 76 | endforeach; ?> |
| 77 | </div><?php |
| 78 | endforeach; |
| 79 | endif; ?> |
| 80 | </div> |