log.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * @var LocationUpdateLogEntry[] $entries
  4. */
  5. ?>
  6. <div class="container-fluid mt-3 py-4">
  7. <h2>Log</h2>
  8. <table class="table table-sm table-bordered">
  9. <thead>
  10. <tr>
  11. <th>Location</th>
  12. <th>Date/Time</th>
  13. <th>User</th>
  14. <th>Field</th>
  15. <th>Before</th>
  16. <th>After</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <?php
  21. foreach($entries as $entry) {
  22. $location = $entry->getLocation();
  23. $user = $entry->getUser();
  24. $dts = Util::getDisplayDateTimeFromUTC($entry->dts);
  25. $modifications = $entry->getModifications();
  26. foreach($modifications as $modification) {
  27. ?>
  28. <tr>
  29. <td><?=htmlspecialchars($dts)?></td>
  30. <td><a href="/account/locations/<?=$location->id?>"><?=htmlspecialchars($location->name)?></a></td>
  31. <td><a href="<?=htmlspecialchars($user->getURL())?>"><?=htmlspecialchars($user->email)?></a></td>
  32. <td class="text-monospace"><?=htmlspecialchars($modification->field)?></td>
  33. <td class="text-monospace"><?=htmlspecialchars($modification->before)?></td>
  34. <td class="text-monospace"><?=htmlspecialchars($modification->after)?></td>
  35. </tr>
  36. <?php
  37. }
  38. ?>
  39. <?php
  40. }
  41. ?>
  42. </tbody>
  43. </table>
  44. </div>