#11: Edit page category/locale selection ------------------------+--------------------------------------------------- Reporter: dom | Owner: Type: enhancement | Status: new Priority: normal | Version: Severity: normal | Resolution: Keywords: | ------------------------+--------------------------------------------------- Changes (by ChristopherSchmidt):
* cc: => crschmidt@crschmidt.net
Comment:
Okay, so I've tossed something for this together on the Boston OpenGuides site.
* Created CGI::Wiki::Plugin:: Summariser, for generating metadata summary lists, http://crschmidt.net/projects/Summariser.pm * Added some code to wiki.cgi in edit_node():
{{{ my $summariser = CGI::Wiki::Plugin::Summariser->new; $wiki->register_plugin( plugin => $summariser ); my @categories = $summariser->metadata_list( type => 'Category' ); my @locales = $summariser->metadata_list( type => 'Locale' ); my %tt_vars = ( global_categories => @categories, global_locales => @locales, ... }}} * Added some code to edit_form.tt:
{{{ [% FOREACH category = global_categories %] <a href='#' onclick="javascript:d=document.getElementById('categories');d.value = d.value + '[% category %]\n'; return false;"> [% category %] </a> * [% END %] }}} and the same for locales.
It's not a *clean* solution by any means, but it works, and should get anyone else who's interested in attacking the problem a running start.