BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

revisionhistoryview.class.php 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. #declare(strict_types=1);
  3. class RevisionHistoryView
  4. {
  5. /**
  6. * Render the revision history
  7. * @param array $RevisionHistory see RevisionHistory::get_revision_history
  8. * @param string $BaseURL
  9. */
  10. public static function render_revision_history($RevisionHistory, $BaseURL)
  11. {
  12. ?>
  13. <table cellpadding="6" cellspacing="1" border="0" width="100%" class="box">
  14. <tr class="colhead">
  15. <td>Revision</td>
  16. <td>Date</td>
  17. <?php if (check_perms('users_mod')) { ?>
  18. <td>User</td>
  19. <?php } ?>
  20. <td>Summary</td>
  21. </tr>
  22. <?php
  23. foreach ($RevisionHistory as $Entry) {
  24. list($RevisionID, $Summary, $Time, $UserID) = $Entry; ?>
  25. <tr class="row">
  26. <td>
  27. <?= "<a href=\"$BaseURL&amp;revisionid=$RevisionID\">#$RevisionID</a>" ?>
  28. </td>
  29. <td>
  30. <?=$Time?>
  31. </td>
  32. <?php if (check_perms('users_mod')) { ?>
  33. <td>
  34. <?=Users::format_username($UserID, false, false, false)?>
  35. </td>
  36. <?php } ?>
  37. <td>
  38. <?=($Summary ? $Summary : '(empty)')?>
  39. </td>
  40. </tr>
  41. <?php
  42. } ?>
  43. </table>
  44. <?php
  45. }
  46. }