jilo-web/public_html/templates/widget-monthly.php

65 lines
3.2 KiB
PHP
Raw Normal View History

2024-08-07 08:13:55 +00:00
<div class="row">
<?php if ($widget['collapsible'] === true) { ?>
2024-08-07 08:13:55 +00:00
<a style="text-decoration: none;" data-toggle="collapse" href="#collapse<?= $widget['name'] ?>" role="button" aria-expanded="true" aria-controls="collapse<?= $widget['name'] ?>">
<div class="card w-auto bg-light card-body" style="flex-direction: row;"><?= $widget['title'] ?></div>
<?php } else { ?>
2024-08-07 08:13:55 +00:00
<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('templates/block-results-filter.php'); } ?>
<?php if ($widget['collapsible'] === true) { ?>
2024-08-07 08:13:55 +00:00
</a>
<?php } ?>
2024-08-07 08:13:55 +00:00
</div>
2024-08-07 08:13:55 +00:00
<!-- widget "<?= $widget['name']; ?>" -->
<div class="collapse show" id="collapse<?= $widget['name'] ?>">
<?php if ($time_range_specified) { ?>
2024-08-07 08:13:55 +00:00
<p class="m-3">time period: <strong><?= $from_time ?> - <?= $until_time ?></strong></p>
<?php } ?>
2024-08-07 08:13:55 +00:00
<div class="mb-5">
<?php if ($widget['full'] === true) { ?>
2024-08-07 08:13:55 +00:00
<table class="table table-striped table-hover table-bordered">
<thead class="thead-dark">
<tr>
<th scope="col"></th>
2024-08-08 08:49:10 +00:00
<?php foreach ($widget['records'] as $record) { ?>
<th scope="col"><?= htmlspecialchars($record['table_headers']) ?></th>
<?php } ?>
2024-08-07 08:13:55 +00:00
</tr>
</thead>
<tbody>
<tr>
<td>conferences</td>
2024-08-08 08:49:10 +00:00
<?php foreach ($widget['records'] as $record) {
print_r($record);
// $from_time = $record['fromMonth']->format('Y-m-d');
// $until_time = $record['untilMonth']->format('Y-m-d');
?>
<td><?php if (!empty($record['conferences'])) { ?>
<a href="?page=conferences&from_time=<?= $record['from_time'] ?>&until_time=<?= $record['until_time'] ?>"><?= htmlspecialchars($record['conferences']) ?></a> <?php } else { ?>
0<?php } ?>
</td>
<?php } ?>
2024-08-07 08:13:55 +00:00
</tr>
<tr>
<td>participants</td>
2024-08-08 08:49:10 +00:00
<?php foreach ($widget['records'] as $record) {
// $from_time = $record['fromMonth']->format('Y-m-d');
// $until_time = $record['untilMonth']->format('Y-m-d');
?>
<td><?= !empty($record['participants']) ? '<a href="?page=participants&from_time=$from_time&until_time=$until_time">' . htmlspecialchars($record['participants']) . '</a>' : '0'; ?></td>
<?php } ?>
2024-08-07 08:13:55 +00:00
</tr>
</tbody>
</table>
<?php } else { ?>
2024-08-07 08:13:55 +00:00
<p class="m-3">No matching records found.</p>
<?php } ?>
2024-08-07 08:13:55 +00:00
</div>
</div>
<!-- /widget "<?= $widget['name']; ?>" -->