Author: nick Date: 2006-08-10 15:29:14 +0100 (Thu, 10 Aug 2006) New Revision: 831
Modified: trunk/lib/OpenGuides.pm trunk/templates/admin_home.tt trunk/templates/needing_moderation.tt trunk/templates/node.tt trunk/wiki.cgi Log: Tweak display of un-moderated pages, and listings of them
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-08-03 16:42:58 UTC (rev 830) +++ trunk/lib/OpenGuides.pm 2006-08-10 14:29:14 UTC (rev 831) @@ -173,6 +173,7 @@ my $raw = $node_data{content} || " "; my $content = $wiki->format($raw); my $modified = $node_data{last_modified}; + my $moderated = $node_data{moderated}; my %metadata = %{$node_data{metadata}};
my ($wgs84_long, $wgs84_lat) = OpenGuides::Utils->get_wgs84_coords( @@ -199,6 +200,7 @@ version => $node_data{version}, node => $id, language => $config->default_language, + moderated => $moderated, oldid => $oldid, enable_gmaps => 1, display_google_maps => $self->get_cookie("display_google_maps"),
Modified: trunk/templates/admin_home.tt =================================================================== --- trunk/templates/admin_home.tt 2006-08-03 16:42:58 UTC (rev 830) +++ trunk/templates/admin_home.tt 2006-08-10 14:29:14 UTC (rev 831) @@ -19,7 +19,7 @@ <tr> <td><a href="[% node.view_url %]">[% node.name %]</a></td> <td>[% node.version %]</td> - <td>[% node.moderate %]</td> + <td>[% IF node.moderate %]yes[% ELSE %]no[% END %]</td> <td><a href="[% node.view_url %]">View</a> or <a href="[% node.versions_url %]">View all versions</a> or <a href="[% node.moderation_url %]">Set Moderation</a>
Modified: trunk/templates/needing_moderation.tt =================================================================== --- trunk/templates/needing_moderation.tt 2006-08-03 16:42:58 UTC (rev 830) +++ trunk/templates/needing_moderation.tt 2006-08-10 14:29:14 UTC (rev 831) @@ -7,14 +7,15 @@ <p> These are nodes which have been created/edited, but not yet moderated. </p> -<table id="wanted_pages" style="width:80%"> +<table id="needing_moderation" style="width:90%"> <tr><th>Node name</th><th>Pending Version</th><th>Latest Moderated Version</th><th>Action</th></tr> [% FOREACH node = nodes %] <tr> <td>[% node.name %]</td> - <td>[% node.version %]</td> - <td>[% node.moderated_version %]</td> + <td align="center">[% node.version %]</td> + <td align="center">[% node.moderated_version %]</td> <td><a href="[% node.moderate_url %]">Moderate this version</a> + or <a href="[% node.view_url %]">View this version</a> or <a href="[% node.diff_url %]">See changes</a> </td> </tr>
Modified: trunk/templates/node.tt =================================================================== --- trunk/templates/node.tt 2006-08-03 16:42:58 UTC (rev 830) +++ trunk/templates/node.tt 2006-08-10 14:29:14 UTC (rev 831) @@ -34,8 +34,13 @@ <h2 class="node_name">[% node_name %]</h2> [% END %] [% ELSE %] - <h2> - <em>Historical version [% version %] of + <h2><em> + [% IF moderated %] + Historical + [% ELSE %] + Un-moderated + [% END %] + version [% version %] of <span class="node_name">[% node_name %]</span></em> </h2> [% END %]
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2006-08-03 16:42:58 UTC (rev 830) +++ trunk/wiki.cgi 2006-08-10 14:29:14 UTC (rev 831) @@ -392,11 +392,12 @@ sub show_needing_moderation { my @nodes = $wiki->list_unmoderated_nodes;
- # Build the moderate link + # Build the moderate links foreach my $node (@nodes) { my $node_param = uri_escape($formatter->node_name_to_node_param($node->{'name'})); $node->{'moderate_url'} = $script_url . "?action=moderate&id=".$node_param."&version=".$node->{'version'}; + $node->{'view_url'} = $script_url . "?id=".$node_param."&version=".$node->{'version'}; $node->{'diff_url'} = $script_url . "?id=".$node_param."&version=".$node->{'moderated_version'}."&diffversion=".$node->{'version'}; }