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.0KB

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