PluginProbe
Disk Usage Insights / 1.6
Disk Usage Insights v1.6
trunk 1.0 1.10 1.11 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
disk-usage-insights / views / blocks / table.php

table.php in Disk Usage Insights 1.6, at views/blocks/table.php

59 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) { // Ensure running within WordPress
3 exit;
4 }
5 ?>
6 <div class="DUI-panel DUI-panel--TOP10">
7 <div class="DUI-panel__headline">
8 <?php echo esc_html($this->headline); ?>
9 <?php if ($pagination !== null) { ?>
10 <div class="DUI-panel__headline-actions">
11 <?php if ($pagination->hasPreviousPage()) { ?>
12 <a href="" hx-trigger="click" hx-target="closest .DUI-panel" hx-swap="outerHTML" hx-get="<?php echo esc_url($pagination->buildPreviousPageUrl()); ?>">&lt;&lt; Previous</a>
13 &nbsp;
14 <?php } ?>
15 <?php if ($pagination->hasNextPage()) { ?>
16 <a href="" hx-trigger="click" hx-target="closest .DUI-panel" hx-swap="outerHTML" hx-get="<?php echo esc_url($pagination->buildNextPageUrl()); ?>">Next &gt;&gt;</a>
17 <?php } ?>
18 </div>
19 <?php } ?>
20 </div>
21 <div class="DUI-panel__content">
22 <table class="DUI-table">
23 <thead>
24 <tr class="DUI-table__header">
25 <?php foreach ($this->columnNames as $col) { ?>
26 <th>
27 <?php echo esc_html($col); ?>
28 </th>
29 <?php } ?>
30 </tr>
31 </thead>
32 <tbody>
33 <?php foreach ($table as $rowIdx => $row) { ?>
34 <tr>
35 <?php foreach ($row as $idx => $column) { ?>
36 <?php if (!empty($this->columnCss[$idx])) { ?>
37 <td class="<?php echo esc_attr($this->columnCss[$idx]); ?>">
38 <?php } else { ?>
39 <td>
40 <?php } ?>
41 <?php if ($this->hasPercentBar($idx)) { ?>
42 <div style="position:relative; min-width: 60px; _outline: 1px solid #ddd;">
43 <div style="background:#eeeeee; width: <?php echo esc_attr($this->getPercentBar($rowIdx)); ?>%;">&nbsp;</div>
44 <div style="position:absolute; top:0; right: 0;">
45 <?php echo esc_html($column); ?>
46 </div>
47 </div>
48 <?php } else { ?>
49 <?php echo esc_html($column); ?>
50 <?php } ?>
51 </td>
52 <?php } ?>
53 </tr>
54 <?php } ?>
55 </tbody>
56 </table>
57 </div>
58 </div>
59