Monthly dashboard stats redesign

main
Yasen Pramatarov 2025-11-20 12:45:18 +02:00
parent f853cf137b
commit 785e9a84eb
1 changed files with 62 additions and 61 deletions

View File

@ -1,33 +1,28 @@
<section class="tm-widget-card tm-call-widget">
<div class="row"> <div class="tm-widget-header">
<div>
<?php if ($widget['collapsible'] === true) { ?> <p class="tm-widget-eyebrow">Conferences</p>
<a style="text-decoration: none;" data-toggle="collapse" href="#collapse<?= htmlspecialchars($widget['name']) ?>" role="button" aria-expanded="true" aria-controls="collapse<?= htmlspecialchars($widget['name']) ?>"> <h3 class="tm-widget-title">
<div class="card w-auto bg-light card-body" style="flex-direction: row;"><?= $widget['title'] ?></div> <?= $widget['title'] ?>
<?php } else { ?> </h3>
<div class="card w-auto bg-light border-light card-body" style="flex-direction: row;"><?= $widget['title'] ?></div>
<?php } ?>
<?php if ($widget['filter'] === true) {
include '../app/templates/block-results-filter.php'; } ?>
<?php if ($widget['collapsible'] === true) { ?>
</a>
<?php } ?>
</div>
<!-- widget "<?= htmlspecialchars($widget['name']) ?>" -->
<div class="collapse show" id="collapse<?= htmlspecialchars($widget['name']) ?>">
<?php if ($time_range_specified) { ?> <?php if ($time_range_specified) { ?>
<p class="m-3">time period: <p class="m-1 mb-0" style="font-size: 0.75rem;">time period:
<strong> <strong>
<?= $from_time == '0000-01-01' ? 'beginning' : date('d M Y', strtotime($from_time)) ?> - <?= $until_time == '9999-12-31' ? 'now' : date('d M Y', strtotime($until_time)) ?> <?= $from_time == '0000-01-01' ? 'beginning' : date('d M Y', strtotime($from_time)) ?> - <?= $until_time == '9999-12-31' ? 'now' : date('d M Y', strtotime($until_time)) ?>
</strong> </strong>
</p> </p>
<?php } ?> <?php } ?>
<div class="mb-5"> </div>
<?php if ($widget['full'] === true) { ?> <div class="tm-widget-tools">
<table class="table table-results table-striped table-hover table-bordered"> <?php if ($widget['filter'] === true) { include '../app/templates/block-results-filter.php'; } ?>
<thead class="thead-dark"> </div>
</div>
<!-- calls -->
<div class="tm-widget-body">
<div class="table-responsive">
<table class="table tm-widget-table" style="font-size: 0.75rem;">
<thead>
<tr> <tr>
<th scope="col"></th> <th scope="col"></th>
<?php foreach ($widget['records'] as $record) { ?> <?php foreach ($widget['records'] as $record) { ?>
@ -36,6 +31,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php if (!empty($widget['records'])) { ?>
<tr> <tr>
<td>conferences</td> <td>conferences</td>
<?php foreach ($widget['records'] as $record) { ?> <?php foreach ($widget['records'] as $record) { ?>
@ -54,11 +50,16 @@
</td> </td>
<?php } ?> <?php } ?>
</tr> </tr>
<?php } else { ?>
<tr>
<td colspan="6">
<p class="tm-widget-empty">No matching records found.</p>
</td>
</tr>
<?php } ?>
</tbody> </tbody>
</table> </table>
<?php } else { ?>
<p class="m-3">No matching records found.</p>
<?php } ?>
</div> </div>
</div> </div>
<!-- /widget "<?= htmlspecialchars($widget['name']) ?>" --> <!-- /monthly conferences -->
</section>