| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- /**
- * @var LocationUpdateLogEntry[] $entries
- * @var object $pagination_object
- */
- ?>
- <div class="container-fluid mt-3 py-4">
- <h2>Log</h2>
- <div class="mb-3">
- <?php
- View::include("pagination", compact("pagination_object"));
- ?>
- </div>
- <table class="table table-sm table-bordered">
- <thead>
- <tr>
- <th>Date/Time</th>
- <th>Location</th>
- <th>User</th>
- <th>Changes</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($entries as $entry) {
- $location = $entry->getLocation();
- $user = $entry->getUser();
- $dts = Util::getDisplayDateTimeFromUTC($entry->dts);
- ?>
- <tr>
- <td><?=htmlspecialchars($dts)?></td>
- <td><a href="/account/locations/<?=$location->id?>"><?=htmlspecialchars($location->name)?></a></td>
- <td><a href="<?=htmlspecialchars($user->getURL())?>"><?=htmlspecialchars($user->email)?></a></td>
- <td>
- <table class="table-sm table-bordered w-100">
- <colgroup>
- <col style="width: 33%"/>
- <col style="width: 33%"/>
- <col style="width: 33%"/>
- </colgroup>
- <thead>
- <tr>
- <th>Field</th>
- <th>Before</th>
- <th>After</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($entry->getModifications() as $modification) {
- ?>
- <tr>
- <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
- }
- ?>
- </tbody>
- </table>
- </td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- <?php
- View::include("pagination", compact("pagination_object"));
- ?>
- </div>
|