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

61 lines
3.5 KiB
PHP
Raw Normal View History

2024-08-07 08:13:55 +00:00
<div class="row">
<?php if ($widget['collapsible'] === true) { ?>
2024-10-04 11:18:28 +00:00
<a style="text-decoration: none;" data-toggle="collapse" href="#collapse<?= htmlspecialchars($widget['name']) ?>" role="button" aria-expanded="true" aria-controls="collapse<?= htmlspecialchars($widget['name']) ?>">
2024-08-07 08:13:55 +00:00
<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) {
2024-09-06 16:34:03 +00:00
include '../app/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-10-04 11:18:28 +00:00
<!-- widget "<?= htmlspecialchars($widget['name']) ?>" -->
<div class="collapse show" id="collapse<?= htmlspecialchars($widget['name']) ?>">
<?php if ($time_range_specified) { ?>
2024-10-04 11:18:28 +00:00
<p class="m-3">time period: <strong><?= htmlspecialchars($from_time) ?> - <?= htmlspecialchars($until_time) ?></strong></p>
<?php } ?>
2024-08-07 08:13:55 +00:00
<div class="mb-5">
<?php if ($widget['full'] === true) { ?>
2024-10-07 07:42:54 +00:00
<table class="table table-results table-striped table-hover table-bordered">
2024-08-07 08:13:55 +00:00
<thead class="thead-dark">
<tr>
<th scope="col"></th>
2024-08-08 08:49:10 +00:00
<?php foreach ($widget['records'] as $record) { ?>
2024-10-04 11:18:28 +00:00
<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-09 08:53:58 +00:00
<?php foreach ($widget['records'] as $record) { ?>
2024-08-08 08:49:10 +00:00
<td><?php if (!empty($record['conferences'])) { ?>
2024-10-04 11:18:28 +00:00
<a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=conferences&from_time=<?= htmlspecialchars($record['from_time']) ?>&until_time=<?= htmlspecialchars($record['until_time']) ?>"><?= htmlspecialchars($record['conferences']) ?></a> <?php } else { ?>
2024-08-08 08:49:10 +00:00
0<?php } ?>
</td>
<?php } ?>
2024-08-07 08:13:55 +00:00
</tr>
<tr>
<td>participants</td>
2024-08-09 08:53:58 +00:00
<?php foreach ($widget['records'] as $record) { ?>
<td><?php if (!empty($record['participants'])) { ?>
2024-10-04 11:18:28 +00:00
<a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=participants&from_time=<?= htmlspecialchars($record['from_time']) ?>&until_time=<?= htmlspecialchars($record['until_time']) ?>"><?= htmlspecialchars($record['participants']) ?></a> <?php } else { ?>
2024-08-09 08:53:58 +00:00
0<?php } ?>
</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>
2024-10-04 11:18:28 +00:00
<!-- /widget "<?= htmlspecialchars($widget['name']) ?>" -->