Author: nick Date: 2006-08-10 17:48:35 +0100 (Thu, 10 Aug 2006) New Revision: 834
Modified: trunk/lib/OpenGuides.pm trunk/templates/admin_home.tt trunk/wiki.cgi Log: Display a confirmation message after moderation actions
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-08-10 16:22:53 UTC (rev 833) +++ trunk/lib/OpenGuides.pm 2006-08-10 16:48:35 UTC (rev 834) @@ -1267,8 +1267,8 @@ not_deletable => 1, deter_robots => 1, version => $version, - moderation_action => 'moderate_node', - moderation_url_args => 'action=moderate_node&version='.$version + moderation_action => 'moderate', + moderation_url_args => 'action=moderate&version='.$version );
my $password = $args{password}; @@ -1443,14 +1443,26 @@ } }
+ # Handle completed notice for actions + my $completed_action = ""; + if($args{moderation_completed}) { + if($args{moderation_completed} eq "moderation") { + $completed_action = "Version Moderated"; + } + if($args{moderation_completed} eq "changed") { + $completed_action = "Node Moderate Flag Changed"; + } + } + # Render in a template my %tt_vars = ( not_editable => 1, not_deletable => 1, deter_robots => 1, - nodes => @nodes, + nodes => @nodes, categories => @categories, - locales => @locales + locales => @locales, + completed_action => $completed_action ); return %tt_vars if $return_tt_vars; my $output = $self->process_template(
Modified: trunk/templates/admin_home.tt =================================================================== --- trunk/templates/admin_home.tt 2006-08-10 16:22:53 UTC (rev 833) +++ trunk/templates/admin_home.tt 2006-08-10 16:48:35 UTC (rev 834) @@ -3,6 +3,10 @@ <div id="content"> [% INCLUDE navbar.tt %] <div id="maincontent"> +[% IF completed_action %] + <br /> + <div style="color: #A0C745">[% completed_action %]</div> +[% END %] <h2>Site Administration</h2> <ul> <li><a href="#nodes">Nodes</a></li>
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2006-08-10 16:22:53 UTC (rev 833) +++ trunk/wiki.cgi 2006-08-10 16:48:35 UTC (rev 834) @@ -83,7 +83,9 @@ metres => $q->param("distance_in_metres") ); } elsif ( $action eq 'admin' ) { - $guide->display_admin_interface(); + $guide->display_admin_interface( + moderation_completed => $q->param("moderation"), + ); } elsif ( $action eq 'show_missing_metadata' ) { $guide->show_missing_metadata( metadata_type => $q->param("metadata_type") || "",
openguides-commits@lists.openguides.org