| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- /**
- * @var Location $location
- */
- $entries = $location->getUpdateLogEntries();
- ?>
- <div class="tab-pane fade" id="log" role="tabpanel" aria-labelledby="log-tab">
- <?php
- if(empty($entries)) {
- ?>
- <div class="alert alert-info">
- <i class="fal fa-fw fa-info-circle"></i> No log entries to display for this location.
- </div>
- <?php
- }
- else {
- ?>
- <table class="table table-sm table-bordered">
- <thead>
- <tr>
- <th>Date/Time</th>
- <th>User</th>
- <th>Field</th>
- <th>Before</th>
- <th>After</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($entries as $entry) {
- $user = $entry->getUser();
- $dts = Util::getDisplayDateTimeFromUTC($entry->dts);
- $modifications = $entry->getModifications();
- foreach($modifications as $modification) {
- ?>
- <tr>
- <td><?=htmlspecialchars($dts)?></td>
- <td><a href="<?=htmlspecialchars($user->getURL())?>"><?=htmlspecialchars($user->email)?></a></td>
- <td class="text-monospace"><?=htmlspecialchars($modification->field)?></td>
- <td class="text-monospace"><?=htmlspecialchars($modification->before)?></td>
- <td class="text-monospace"><?=htmlspecialchars($modification->after)?></td>
- </tr>
- <?php
- }
- ?>
- <?php
- }
- ?>
- </tbody>
- </table>
- <?php
- }
- ?>
- </div>
|