The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
[% USE CGI %]
[% INCLUDE header.tt page_title = "History of $node_name - $site_name" %]
[% INCLUDE banner.tt %]
<div id="content">

[% IF !config.content_above_navbar_in_html %]
  [% INCLUDE navbar.tt %]
[% END %]

<div id="maincontent">
<h1>
  [% site_name %] - History of <span class="node_name">[% node_name %]</span>
</h1>
<p>
Note: only administrators can delete historical versions.
</p>
<ul class="node_history">
[%
  months.1 = 'January';
  months.2 = 'February';
  months.3 = 'March';
  months.4 = 'April';
  months.5 = 'May';
  months.6 = 'June';
  months.7 = 'July';
  months.8 = 'August';
  months.9 = 'September';
  months.10 = 'October';
  months.11 = 'November';
  months.12 = 'December';
%]
[% FOREACH revision = history %]
[%
  matches = revision.modified.match('(\d\d\d\d)-(\d\d)-(\d\d) (\d\d:\d\d:\d\d)');
  year  = matches.0;
  month = matches.1;
  day   = matches.2;
  time  = matches.3;
  month = month.remove('^0');
  revision.date = "$time, $day " _ months.$month _ " $year"
%]
  <li>
      [% IF revision.version != version %]
      (<a href="[% cgi_url %]?id=[% node_param %]&version=[% revision.version %]&diffversion=[% version %]">cur</a>)
      [% ELSE %]
      (cur)
      [% END %]
      [% IF revision.version == 1 %]
      (last)
      [% ELSE %]
      (<a href="[% cgi_url %]?id=[% node_param %]&version=[% revision.version - 1 %]&diffversion=[% revision.version %]">last</a>)
      [% END %] 
      &nbsp;&nbsp;&nbsp;
      <a href="[% cgi_url %]?id=[% node_param %]&version=[% revision.version %]">[% revision.date %]</a>&nbsp;&nbsp;
      [% IF revision.username %]
      <a href="[% cgi_url %]?username=[% revision.username %]&action=userstats">[% revision.username %]</a>
      [% END %]
      [% IF revision.comment %]
        &nbsp;&nbsp;<i>([% revision.comment %])</i>
      [% END %]
      [% IF enable_page_deletion AND is_admin %]
        &nbsp;&nbsp;<small>[<a href="[% full_cgi_url %]?id=[% node_param %];version=[% revision.version %];action=delete">delete</a>]</small>
      [% END %]
  </li>
[% END %]
</ul>

<p>
  <a href="[% cgi_url %]?[% node_param %]">View current revision</a>
</p>

<p>
  This list is available as a
  <a href="[% cgi_url %]?action=list_all_versions;format=rss;id=[% node_param %]">rss feed</a>
  and as an
  <a href="[% cgi_url %]?action=list_all_versions;format=atom;id=[% node_param %]">atom feed</a>.
</p>
</div>

[% IF config.content_above_navbar_in_html %]
  [% INCLUDE navbar.tt %]
[% END %]

[% INCLUDE footer.tt %]