Author: dom Date: 2006-09-11 08:55:40 +0100 (Mon, 11 Sep 2006) New Revision: 852
Modified: trunk/lib/OpenGuides.pm trunk/templates/admin_home.tt trunk/templates/moderate_confirm.tt trunk/wiki.cgi Log: More cleanups after nick in admin code:
- remove unnecessary capitalization - fix all links to wiki.cgi
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-09-10 18:02:17 UTC (rev 851) +++ trunk/lib/OpenGuides.pm 2006-09-11 07:55:40 UTC (rev 852) @@ -213,7 +213,7 @@ $tt_vars{common_catloc} = 1; $tt_vars{common_categories} = $config->enable_common_categories; $tt_vars{common_locales} = $config->enable_common_locales; - $tt_vars{catloc_link} = $config->script_url . "?id="; + $tt_vars{catloc_link} = $config->script_name . "?id="; }
if ( $raw =~ /^#REDIRECT\s+(.+?)\s*$/ ) { @@ -1341,7 +1341,7 @@
my $wiki = $self->wiki; my $formatter = $self->wiki->formatter; - my $script_url = $self->config->script_url; + my $script_name = $self->config->script_name;
my ($metadata_type, $metadata_value, $exclude_locales, $exclude_categories) = @args{ qw( metadata_type metadata_value exclude_locales exclude_categories ) }; @@ -1381,8 +1381,8 @@
# Save into the hash $n{'name'} = $node; - $n{'view_url'} = $script_url . "?id=" . $node_param; - $n{'edit_url'} = $script_url . "?id=" . $node_param . ";action=edit"; + $n{'view_url'} = $script_name . "?id=" . $node_param; + $n{'edit_url'} = $script_name . "?id=" . $node_param . ";action=edit"; push @tt_nodes, %n; }
@@ -1422,7 +1422,7 @@
my $wiki = $self->wiki; my $formatter = $self->wiki->formatter; - my $script_url = $self->config->script_url; + my $script_name = $self->config->script_name;
# Grab all the nodes my @all_nodes = $wiki->list_all_nodes(with_details=>1); @@ -1436,9 +1436,11 @@ for my $node (@all_nodes) { # Make the URLs my $node_param = uri_escape( $formatter->node_name_to_node_param( $node->{'name'} ) ); - $node->{'view_url'} = $script_url . "?id=" . $node_param; - $node->{'versions_url'} = $script_url . "?action=list_all_versions;id=" . $node_param; - $node->{'moderation_url'} = $script_url . "?action=set_moderation;id=" . $node_param; + $node->{'view_url'} = $script_name . "?id=" . $node_param; + $node->{'versions_url'} = $script_name . + "?action=list_all_versions;id=" . $node_param; + $node->{'moderation_url'} = $script_name . + "?action=set_moderation;id=" . $node_param;
# Filter if($node->{'name'} =~ /^Category /) { @@ -1458,10 +1460,10 @@ my $completed_action = ""; if($args{moderation_completed}) { if($args{moderation_completed} eq "moderation") { - $completed_action = "Version Moderated"; + $completed_action = "Version moderated"; } if($args{moderation_completed} eq "changed") { - $completed_action = "Node Moderate Flag Changed"; + $completed_action = "Node moderation flag changed"; } }
Modified: trunk/templates/admin_home.tt =================================================================== --- trunk/templates/admin_home.tt 2006-09-10 18:02:17 UTC (rev 851) +++ trunk/templates/admin_home.tt 2006-09-11 07:55:40 UTC (rev 852) @@ -12,8 +12,8 @@ <li><a href="#nodes">Nodes</a></li> <li><a href="#locales">Locales</a></li> <li><a href="#categories">Categories</a></li> - <li><a href="?action=show_needing_moderation">Pages Needing Moderation</a> - <li><a href="?action=show_missing_metadata">Pages Missing Metadata</a> + <li><a href="[% cgi_url %]?action=show_needing_moderation">Pages needing moderation</a> + <li><a href="[% cgi_url %]?action=show_missing_metadata">Pages missing metadata</a> </ul>
<a name="nodes"></a> @@ -25,9 +25,8 @@ <td class="admin_version">[% node.version %]</td> <td class="admin_moderate">[% IF node.moderate %]yes[% ELSE %]no[% END %]</td> <td class="admin_action"> - <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> + <a href="[% node.moderation_url %]">Set moderation</a> </td> </tr> [% END %] @@ -44,9 +43,8 @@ <td class="admin_version">[% locale.version %]</td> <td class="admin_moderate">[% IF node.moderate %]yes[% ELSE %]no[% END %]</td> <td class="admin_action"> - <a href="[% locale.view_url %]">View</a> or <a href="[% locale.versions_url %]">View all versions</a> or - <a href="[% locale.moderation_url %]">Set Moderation</a> + <a href="[% locale.moderation_url %]">Set moderation</a> </td> </tr> [% END %] @@ -63,9 +61,8 @@ <td class="admin_version">[% cat.version %]</td> <td class="admin_moderate">[% IF node.moderate %]yes[% ELSE %]no[% END %]</td> <td class="admin_action"> - <a href="[% cat.view_url %]">View</a> or <a href="[% cat.versions_url %]">View all versions</a> or - <a href="[% cat.moderation_url %]">Set Moderation</a> + <a href="[% cat.moderation_url %]">Set moderation</a> </td> </tr> [% END %]
Modified: trunk/templates/moderate_confirm.tt =================================================================== --- trunk/templates/moderate_confirm.tt 2006-09-10 18:02:17 UTC (rev 851) +++ trunk/templates/moderate_confirm.tt 2006-09-11 07:55:40 UTC (rev 852) @@ -31,7 +31,7 @@ [% END %] <strong>Password:</strong> <input type="password" name="password" /> - <input type="submit" value="Action Moderation" /> + <input type="submit" value="Go!" /> </form>
</div>
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2006-09-10 18:02:17 UTC (rev 851) +++ trunk/wiki.cgi 2006-09-11 07:55:40 UTC (rev 852) @@ -401,9 +401,9 @@ 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'}; + $node->{'moderate_url'} = $script_name . "?action=moderate&id=".$node_param."&version=".$node->{'version'}; + $node->{'view_url'} = $script_name . "?id=".$node_param."&version=".$node->{'version'}; + $node->{'diff_url'} = $script_name . "?id=".$node_param."&version=".$node->{'moderated_version'}."&diffversion=".$node->{'version'}; }
process_template( "needing_moderation.tt",
openguides-commits@lists.openguides.org