PluginProbe
Disk Usage Insights / 1.5
Disk Usage Insights v1.5
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.5, at views/blocks/table.php

46 lines 1.7 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><?php echo esc_html($this->headline); ?></div>
8 <div class=DUI-panel__content>
9 <table class=DUI-table>
10 <thead>
11 <tr class=DUI-table__header>
12 <?php foreach ($this->columnNames as $col) { ?>
13 <th>
14 <?php echo esc_html($col); ?>
15 </th>
16 <?php } ?>
17 </tr>
18 </thead>
19 <tbody>
20 <?php foreach ($table as $rowIdx => $row) { ?>
21 <tr>
22 <?php foreach ($row as $idx => $column) { ?>
23 <?php if (!empty($this->columnCss[$idx])) { ?>
24 <td class="<?php echo esc_attr($this->columnCss[$idx]); ?>">
25 <?php } else { ?>
26 <td>
27 <?php } ?>
28 <?php if ($this->hasPercentBar($idx)) { ?>
29 <div style="position:relative; min-width: 60px; _outline: 1px solid #ddd;">
30 <div style="background:#eeeeee; width: <?php echo esc_attr($this->getPercentBar($rowIdx)); ?>%;">&nbsp;</div>
31 <div style="position:absolute; top:0; right: 0;">
32 <?php echo esc_html($column); ?>
33 </div>
34 </div>
35 <?php } else { ?>
36 <?php echo esc_html($column); ?>
37 <?php } ?>
38 </td>
39 <?php } ?>
40 </tr>
41 <?php } ?>
42 </tbody>
43 </table>
44 </div>
45 </div>
46