Subject: | add wafl key to display all shortcuts |
Here's a patch to add a wafl phrase to display all shortcuts, for example on your InterWiki page:
$registry->add(wafl => 'all_shortcuts' => 'Kwiki::ShortcutLinks::All');
....
package Kwiki::ShortcutLinks::All;
use base 'Spoon::Formatter::WaflPhrase';
sub to_html {
my $ret = "<pre>";
my $shortcuts = $self->hub->registry->lookup->{shortcut_links};
for my $key (keys %{ $shortcuts }) {
$ret .= "$key: " . $shortcuts->{$key}[1] . "\n";
}
$ret .= "</pre>";
return $ret;
}