group-select.blade.php
9 months ago
referrer-column.blade.php
3 months ago
rows.blade.php
2 days ago
table-toolbar.blade.php
2 days ago
table.blade.php
2 days ago
table.blade.php
99 lines
| 1 | @php /** @var \IAWP\Tables\Table $table */ @endphp |
| 2 | |
| 3 | <div id="iawp-table-wrapper" class="iawp-table-wrapper" data-controller="table-columns"> |
| 4 | <div id="data-table-container" class="data-table-container"> |
| 5 | <div id="data-table" |
| 6 | class="data-table" |
| 7 | data-table-name="<?php echo esc_attr($table->id()); ?>" |
| 8 | data-columns="<?php echo \IAWP\Utils\Security::json_encode($all_columns); ?>" |
| 9 | data-column-count="<?php echo count($all_columns); ?>" |
| 10 | data-total-number-of-rows="" |
| 11 | style="min-width: <?php echo absint($visible_column_count) * 170; ?>px; --columns: <?php echo absint($visible_column_count) ; ?>; --columns-mobile: <?php echo absint($visible_column_count - 1); ?>" |
| 12 | > |
| 13 | |
| 14 | <!-- Header --> |
| 15 | <div id="iawp-columns" class="iawp-columns"> |
| 16 | <div class="iawp-row" data-controller="sort"><?php |
| 17 | foreach ($all_columns as $column) : |
| 18 | $cell_class = $column->is_visible() ? 'cell' : 'cell hide'; ?> |
| 19 | <div class="<?php echo esc_attr($cell_class); ?>" |
| 20 | data-column="<?php echo esc_attr($column->id()); ?>" |
| 21 | data-test-visibility="<?php echo $column->is_visible() ? 'visible' : 'hidden'; ?>" |
| 22 | > |
| 23 | <button class="sort-button" |
| 24 | data-sort-target="sortButton" |
| 25 | data-sort-direction="<?php echo $column->id() === esc_attr($sort_column) ? esc_attr($sort_direction) : ''; ?>" |
| 26 | data-default-sort-direction="<?php echo esc_attr($column->sort_direction()); ?>" |
| 27 | data-sort-column="<?php echo esc_attr($column->id()); ?>" |
| 28 | data-action="sort#sortColumnColumn" |
| 29 | title="<?php echo esc_html($column->name()); ?>" |
| 30 | > |
| 31 | <div class="row-number"></div> |
| 32 | <span class="name"><?php echo esc_html($column->name()); ?></span> |
| 33 | <span class="dashicons dashicons-arrow-right"></span> |
| 34 | <span class="dashicons dashicons-arrow-up"></span> |
| 35 | <span class="dashicons dashicons-arrow-down"></span> |
| 36 | <div class="animator"></div> |
| 37 | </button> |
| 38 | </div><?php |
| 39 | endforeach; ?> |
| 40 | </div> |
| 41 | </div> |
| 42 | |
| 43 | <!-- Skeleton --> |
| 44 | <?php |
| 45 | if ($render_skeleton) : ?> |
| 46 | <div id="iawp-rows" class="iawp-rows rendering"><?php |
| 47 | foreach (range(1, $page_size) as $index) : ?> |
| 48 | <div class="iawp-row"><?php |
| 49 | foreach ($all_columns as $column) : |
| 50 | $class = $column->is_visible() ? 'cell' : 'cell hide'; ?> |
| 51 | <div class="<?php echo esc_attr($class); ?>" |
| 52 | data-column="<?php echo esc_attr($column->id()); ?>" |
| 53 | data-test-visibility="<?php echo $column->is_visible() ? 'visible' : 'hidden'; ?>" |
| 54 | > |
| 55 | <div class="row-number"></div> |
| 56 | <span class="cell-content"> |
| 57 | <span class="skeleton-loader"></span> |
| 58 | </span> |
| 59 | <span class="animator"></span> |
| 60 | </div><?php |
| 61 | endforeach; ?> |
| 62 | </div><?php |
| 63 | endforeach; ?> |
| 64 | </div><?php |
| 65 | endif; |
| 66 | |
| 67 | if (!$render_skeleton) { |
| 68 | echo iawp_render('tables.rows', [ |
| 69 | 'table' => $table, |
| 70 | 'all_columns' => $all_columns, |
| 71 | 'visible_column_count' => $visible_column_count, |
| 72 | 'number_of_shown_rows' => $number_of_shown_rows, |
| 73 | 'rows' => $rows, |
| 74 | 'render_skeleton' => $render_skeleton, |
| 75 | 'page_size' => $page_size, |
| 76 | 'sort_column' => $sort_column, |
| 77 | 'sort_direction' => $sort_direction, |
| 78 | 'has_campaigns' => $has_campaigns, |
| 79 | ]); |
| 80 | } ?> |
| 81 | </div> |
| 82 | </div> |
| 83 | |
| 84 | <div class="pagination"> |
| 85 | <button id="pagination-button" |
| 86 | class="iawp-button purple" |
| 87 | data-report-target="loadMore" |
| 88 | data-action="report#loadMore" |
| 89 | > |
| 90 | <span class="disabled-button-text"> |
| 91 | <?php esc_html_e('Showing All Rows', 'independent-analytics'); ?> |
| 92 | </span> |
| 93 | <span class="enabled-button-text"> |
| 94 | <?php esc_html(printf(__('Load Next %d Rows', 'independent-analytics'), $page_size)); ?> |
| 95 | </span> |
| 96 | </button> |
| 97 | </div> |
| 98 | </div> |
| 99 |