Oppaitime'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 940B

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