| 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()); ?>"><< Previous</a> |
| 13 |
|
| 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 >></a> |
| 17 |
<?php } ?> |
| 18 |
</div> |
| 19 |
<?php } ?> |
| 20 |
</div> |
| 21 |
<div class="DUI-panel__content"> |
| 22 |
<?php if (!empty($this->vbarChart)) { ?> |
| 23 |
<div class="vbarchart"> |
| 24 |
<?php foreach ($this->vbarChart as $idx => $height) { ?> |
| 25 |
<div class="vbarchart__bar vbarchart__color--<?php echo esc_attr($idx % 10); ?>" style="height:<?php echo esc_attr($height); ?>%"></div> |
| 26 |
<?php } ?> |
| 27 |
</div> |
| 28 |
<?php } ?> |
| 29 |
|
| 30 |
<table class="DUI-table"> |
| 31 |
<thead> |
| 32 |
<tr class="DUI-table__header"> |
| 33 |
<?php foreach ($this->columnNames as $col) { ?> |
| 34 |
<th> |
| 35 |
<?php echo esc_html($col); ?> |
| 36 |
</th> |
| 37 |
<?php } ?> |
| 38 |
</tr> |
| 39 |
</thead> |
| 40 |
<tbody> |
| 41 |
<?php foreach ($table as $rowIdx => $row) { ?> |
| 42 |
<tr> |
| 43 |
<?php foreach ($row as $idx => $column) { ?> |
| 44 |
<?php if (!empty($this->columnCss[$idx])) { ?> |
| 45 |
<td class="<?php echo esc_attr($this->columnCss[$idx]); ?>"> |
| 46 |
<?php } else { ?> |
| 47 |
<td> |
| 48 |
<?php } ?> |
| 49 |
<?php if ($idx == 0 && !empty($this->vbarChart)) { ?> |
| 50 |
<div class="vbarchart__legendcolor vbarchart__color--<?php echo esc_attr($rowIdx % 10); ?>"></div> |
| 51 |
<?php } ?> |
| 52 |
<?php if ($this->hasPercentBar($idx)) { ?> |
| 53 |
<div style="position:relative; min-width: 60px; _outline: 1px solid #ddd;"> |
| 54 |
<div style="background:#eeeeee; width: <?php echo esc_attr($this->getPercentBar($rowIdx)); ?>%;"> </div> |
| 55 |
<div style="position:absolute; top:0; right: 0;"> |
| 56 |
<?php echo esc_html($column); ?> |
| 57 |
</div> |
| 58 |
</div> |
| 59 |
<?php } else { ?> |
| 60 |
<?php echo esc_html($column); ?> |
| 61 |
<?php } ?> |
| 62 |
</td> |
| 63 |
<?php } ?> |
| 64 |
</tr> |
| 65 |
<?php } ?> |
| 66 |
</tbody> |
| 67 |
</table> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
|