- <th><a href="?sort=~sorting-by-filename~filename">Filename</a></th>
- <th><a href="?sort=~sorting-by-title~title">Title</a></th>
- <th> </th>
- </tr><!--~rows {~-->
- <tr>
- <td class="listing"><a href="admin_pages?edit_id=~id~">~filename html~<!--~filename empty {~--><em>(offline)</em><!--~}~--></a></td>
- <td class="listing"><a href="admin_pages?edit_id=~id~">~title html~<!--~title empty {~--><em>(untitled)</em><!--~}~--></a></td>
- <td><a href="admin_pages?admin_pages_delete_id=~id~" onclick="return confirm('Permanently delete?')">[delete]</a></td>
- </tr><!--~}~-->
-
+ <th>title</th>
+ <th>saved at</th>
+ <th>by</th>
+ <th></th>
+ </tr>
+ <!--~rows {~-->
+ <tr>
+ <td>~title html~<!--~title empty {~--><em>(untitled)</em><!--~}~--></td>
+ <td class="timestamp">~timestamp~</td>
+ <td>~who html~</td>
+ <td>
+ <!--~first {~-->
+ <!--~filename nonempty {~-->
+ <form style="display: inline-block" action="~filename attr~"><input type="submit" value="view"></form>
+ <!--~}~-->
+ <!--~filename empty {~-->
+ <form style="display: inline-block" action="admin_pages"><input type="hidden" name="id" value="~page_id~"><input type="submit" value="view"></form>
+ <!--~}~-->
+ <!--~}~-->
+ <!--~first unset {~-->
+ <form style="display: inline-block" action="admin_pages"><input type="hidden" name="history_id" value="~history_id~"><input type="submit" value="view"></form>
+ <!--~}~-->
+ </td>
+ </tr>
+ <!--~}~-->
+ <script>
+ (function () {
+ var i, i02, d, hours, el, els
+ i02 = function (i) { return i > 9 ? i : '0' + i }
+ els = document.getElementsByClassName('timestamp');
+ for (i = 0; i < els.length; ++i) {
+ el = els[i]
+ d = new Date(parseInt(el.innerText) * 1000)
+ hours = d.getHours();
+ el.innerText =
+ i02(d.getMonth() + 1) + '/' +
+ i02(d.getDate()) + '/' +
+ d.getFullYear() + ' ' +
+ i02((hours + 11) % 12 + 1) + ':' +
+ i02(d.getMinutes()) + '' +
+ (hours < 12 ? 'am' : 'pm')
+ }
+ })();
+ </script>