Changeset 909 for trunk/templates

Show
Ignore:
Timestamp:
12/10/06 23:41:48 (2 years ago)
Author:
earle
Message:

Redesigned node history view a la MediaWiki?; upgraded Template prereq to 2.15.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/templates/node_history.tt

    r867 r909  
    1212</p> 
    1313<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%] 
    1428[% 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%] 
    1538  <li> 
    16       <a href="[% cgi_url %]?id=[% node_param %];version=[% revision.version %]">Version [% revision.version %]</a> 
    1739      [% IF revision.version != version %] 
    18       (diff: 
    19       [% UNLESS revision.version == 1 %]<a href="[% cgi_url %]?id=[% node_param %];version=[% revision.version - 1 %];diffversion=[% revision.version %]">previous</a> / [% END %]  
    20       <a href="[% cgi_url %]?id=[% node_param %];version=[% revision.version %];diffversion=[% version %]">current</a>) 
     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>) 
    2148      [% END %]  
    22       ..... 
    23       [% revision.modified %] 
     49      &nbsp;&nbsp;&nbsp; 
     50      <a href="[% cgi_url %]?id=[% node_param %]&version=[% revision.version %]">[% revision.date %]</a>&nbsp;&nbsp; 
    2451      [% IF revision.username %] 
    25         by <a href="[% cgi_url %]?username=[% revision.username %];action=userstats">[% revision.username %]</a> 
     52      <a href="[% cgi_url %]?username=[% revision.username %]&action=userstats">[% revision.username %]</a> 
    2653      [% END %] 
    2754      [% IF revision.comment %] 
    28         <b>[[% revision.comment %]]</b> 
     55        &nbsp;&nbsp;<i>([% revision.comment %])</i> 
    2956      [% END %] 
    3057      [% IF enable_page_deletion %] 
    31         [<a href="[% full_cgi_url %]?id=[% node_param %];version=[% revision.version %];action=delete">delete</a>] 
     58        &nbsp;&nbsp;<small>[<a href="[% full_cgi_url %]?id=[% node_param %];version=[% revision.version %];action=delete">delete</a>]</small> 
    3259      [% END %] 
    3360  </li>