Changeset 909


Ignore:
Timestamp:
Dec 10, 2006, 11:41:48 PM (15 years ago)
Author:
Earle Martin
Message:

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Build.PL

    r886 r909  
    271271        $search_module                        => 0,
    272272        'POSIX'                               => 0,
    273         'Template'                            => 0,
     273        'Template'                            => '2.15', # for hash.remove vmethod
    274274        'Test::MockObject'                    => '0.07', # earlier doesn't use 'mock'
    275275        'Time::Piece'                         => 0,
  • trunk/Changes

    r890 r909  
    33        Tidy up some minor bugs in the new features.
    44        Add RDF autodiscovery link to nodes' <head> section.
     5        Redesign node history view along lines of that used by MediaWiki
     6          (http://www.mediawiki.org/) for clarity.
    57        Add UPGRADING file which summarises important information for people
    68        upgrading.
  • 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>
Note: See TracChangeset for help on using the changeset viewer.