root/trunk/templates/node_history.tt

Revision 1243, 2.3 kB (checked in by dom, 4 weeks ago)

Don't add delete links unless the user requests (fixes #159 - thanks bob)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1[% USE CGI %]
2[% INCLUDE header.tt page_title = "History of $node_name - $site_name" %]
3[% INCLUDE banner.tt %]
4<div id="content">
5[% INCLUDE navbar.tt %]
6<div id="maincontent">
7<h1>
8  [% site_name %] - History of <span class="node_name">[% node_name %]</span>
9</h1>
10<p>
11Note: only administrators can delete historical versions.
12</p>
13<ul>
14[%
15  months.1 = 'January';
16  months.2 = 'February';
17  months.3 = 'March';
18  months.4 = 'April';
19  months.5 = 'May';
20  months.6 = 'June';
21  months.7 = 'July';
22  months.8 = 'August';
23  months.9 = 'September';
24  months.10 = 'October';
25  months.11 = 'November';
26  months.12 = 'December';
27%]
28[% FOREACH revision = history %]
29[%
30  matches = revision.modified.match('(\d\d\d\d)-(\d\d)-(\d\d) (\d\d:\d\d:\d\d)');
31  year  = matches.0;
32  month = matches.1;
33  day   = matches.2;
34  time  = matches.3;
35  month = month.remove('^0');
36  revision.date = "$time, $day " _ months.$month _ " $year"
37%]
38  <li>
39      [% IF revision.version != version %]
40      (<a href="[% cgi_url %]?id=[% node_param %]&version=[% revision.version %]&diffversion=[% version %]">cur</a>)
41      [% ELSE %]
42      (cur)
43      [% END %]
44      [% IF revision.version == 1 %]
45      (last)
46      [% ELSE %]
47      (<a href="[% cgi_url %]?id=[% node_param %]&version=[% revision.version - 1 %]&diffversion=[% revision.version %]">last</a>)
48      [% END %]
49      &nbsp;&nbsp;&nbsp;
50      <a href="[% cgi_url %]?id=[% node_param %]&version=[% revision.version %]">[% revision.date %]</a>&nbsp;&nbsp;
51      [% IF revision.username %]
52      <a href="[% cgi_url %]?username=[% revision.username %]&action=userstats">[% revision.username %]</a>
53      [% END %]
54      [% IF revision.comment %]
55        &nbsp;&nbsp;<i>([% revision.comment %])</i>
56      [% END %]
57      [% IF enable_page_deletion AND is_admin %]
58        &nbsp;&nbsp;<small>[<a href="[% full_cgi_url %]?id=[% node_param %];version=[% revision.version %];action=delete">delete</a>]</small>
59      [% END %]
60  </li>
61[% END %]
62</ul>
63
64<p>
65  <a href="[% cgi_url %]?[% node_param %]">View current revision</a>
66</p>
67
68<p>
69  This list is available as a
70  <a href="[% cgi_url %]?action=list_all_versions;format=rss;id=[% node_param %]">rss feed</a>
71  and as an
72  <a href="[% cgi_url %]?action=list_all_versions;format=atom;id=[% node_param %]">atom feed</a>.
73</p>
74</div>
75[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the browser.