make list of macros clearer as to which are enabled and which are not

This commit is contained in:
Colin Kuskie 2006-06-22 16:46:11 +00:00
parent 934b6f9771
commit 44447f8315
2 changed files with 23 additions and 8 deletions

View file

@ -30,19 +30,27 @@ our $HELP = {
##Build list of enabled macros, by namespace, by reversing session hash:
my %macros = reverse %{ $session->config->get("macros") };
my $i18n = WebGUI::International->new($session, 'Macros');
my $yes = $i18n->get(138, 'WebGUI');
my $no = $i18n->get(139, 'WebGUI');
my $macro_table =
join "\n",
map { join '', '<tr><td>', $_, '</td><td>',
($macros{$_} ? ('&#94;', $macros{$_}, '();') : '&nbsp;'),
'</td></tr>' }
@macros;
map { join '', '<tr><td>', $_,
'</td><td>',
($macros{$_} ? $yes : $no),
'</td><td>',
($macros{$_} ? ('&#94;', $macros{$_}, '();') : '&nbsp;'),
'</td></tr>'
} @macros;
my $i18n = WebGUI::International->new($session, 'Macros');
$macro_table =
join("\n",
$i18n->get('macros list body'),
'<table border="1" cellpadding="3">',
'<tr><th>',$i18n->get('macro name'),
'</th><th>',
$i18n->get('macro enabled header'),
'</th><th>',
$i18n->get('macro shortcut'),
'</th></tr>',$macro_table,'</table>');
},