Author: nick Date: 2006-08-03 15:39:16 +0100 (Thu, 03 Aug 2006) New Revision: 825
Modified: trunk/lib/OpenGuides.pm trunk/templates/missing_metadata.tt trunk/wiki.cgi Log: Few missing metadata related tweaks
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-08-03 14:26:35 UTC (rev 824) +++ trunk/lib/OpenGuides.pm 2006-08-03 14:39:16 UTC (rev 825) @@ -1150,6 +1150,7 @@
my @nodes; my $done_search = 0; +warn("Metadata type is '$metadata_type'\n");
# Only search if they supplied at least a metadata type if($metadata_type) {
Modified: trunk/templates/missing_metadata.tt =================================================================== --- trunk/templates/missing_metadata.tt 2006-08-03 14:26:35 UTC (rev 824) +++ trunk/templates/missing_metadata.tt 2006-08-03 14:39:16 UTC (rev 825) @@ -6,9 +6,10 @@ <h2>Pages Missing Metadata</h2>
<form method="get" action="wiki.cgi"> +<input type="hidden" name="action" value="show_missing_metadata" /> <div> <label for="metadata_type">Metadata Type:</label> - <select name="metadata_type"> + <select name="metadata_type" id="metadata_type"> <option value="category">Category</option> <option value="locale">Locale</option> <option value="address">Address</option> @@ -19,6 +20,14 @@ <option value="os_x">OS X</option> <option value="os_y">OS Y</option> </select> + <script type="text/javascript"> + var metadata_type = document.getElementById("metadata_type"); + for(var i=0; i<metadata_type.options.length; i++) { + if(metadata_type.options[i].value == '[% metadata_type %]') { + metadata_type.options[i].selected = true; + } + } + </script> </div> <div> <label for="metadata_value">Metadata Value:</label> @@ -27,6 +36,14 @@ <i>Optional, eg 'pub' when metadata value is Category</i> </div> <div> + <label for="exclude_locales">Exclude Locales:</label> + <input type="checkbox" name="exclude_locales" [% IF exclude_locales %]checked="true"[% END %] /> +</div> +<div> + <label for="exclude_categories">Exclude Categories:</label> + <input type="checkbox" name="exclude_categories" [% IF exclude_categories %]checked="true"[% END %] /> +</div> +<div> <input type="submit" value="Find Nodes" /> </div> </form>
Modified: trunk/wiki.cgi =================================================================== --- trunk/wiki.cgi 2006-08-03 14:26:35 UTC (rev 824) +++ trunk/wiki.cgi 2006-08-03 14:39:16 UTC (rev 825) @@ -86,10 +86,10 @@ $guide->display_admin_interface(); } elsif ( $action eq 'show_missing_metadata' ) { $guide->show_missing_metadata( - metadata_type => $q->param("metadata_type"), - metadata_value => $q->param("metadata_value"), - exclude_locales => $q->param("exclude_locales"), - exclude_categories => $q->param("exclude_categories") + metadata_type => $q->param("metadata_type") || "", + metadata_value => $q->param("metadata_value") || "", + exclude_locales => $q->param("exclude_locales") || "", + exclude_categories => $q->param("exclude_categories") || "" ); } elsif ( $action eq 'set_moderation' ) { $guide->set_node_moderation(