Admin code for manage, and i18n.

This commit is contained in:
Colin Kuskie 2009-05-15 21:31:20 -07:00
parent e1329192b9
commit ecb3e7d394
2 changed files with 39 additions and 8 deletions

View file

@ -7,6 +7,7 @@ use WebGUI::HTMLForm;
use WebGUI::International;
use WebGUI::Pluggable;
use WebGUI::Utility;
use WebGUI::FilePump::Bundle;
=head1 NAME
@ -108,13 +109,12 @@ sub www_editBundle {
$form->dynamicForm([WebGUI::FilePump::Bundle->crud_definition($session)], 'properties', $bundle);
$form->submit;
my $i18n = WebGUI::International->new($session, 'PassiveAnalytics');
my $ac = WebGUI::AdminConsole->new($session,'passiveAnalytics');
$ac->addSubmenuItem($session->url->page("op=passiveAnalytics;func=editRuleflow"), $i18n->get("manage ruleset"));
if ($ruleId eq 'new') {
$rule->delete;
my $i18n = WebGUI::International->new($session, 'FilePump');
my $ac = WebGUI::AdminConsole->new($session,'filePump');
if ($bundleId eq 'new') {
$bundle->delete;
}
return $ac->render($error.$form->print,$i18n->get('Edit Rule'));
return $ac->render($error.$form->print,$i18n->get('Edit Bundle'));
}
#-------------------------------------------------------------------
@ -169,9 +169,22 @@ A WebGUI session object.
sub www_manage {
my $session = shift;
return $session->privilege->insufficient() unless canView($session);
my $ac = WebGUI::AdminConsole->new($session,'passiveAnalytics');
my $i18n = WebGUI::International->new($session, 'FilePump');
my $error = shift;
my $rows = '';
my $getABundle = WebGUI::FilePump::Bundle->getAllIterator($session,{ orderBy => 'bundleName' } );
while (my $bundle = $getABundle->()) {
$rows .= sprintf '<tr><td>&nbsp;</td><td>%s</td>', $bundle->get('bundleName');
}
my $output = sprintf <<EOHTML, $i18n->get('bundle name');
<table border="1">
<tr><th>&nbsp;</th><th>%s</th></tr>
%s
</table>
EOHTML
my $ac = WebGUI::AdminConsole->new($session,'filePump');
$ac->addSubmenuItem($session->url->page('op=filePump;func=add'), $i18n->get('add a bundle'));
return $ac->render($error.$f->print.$addmenu.$steps, 'Passive Analytics');
return $ac->render($error.$output, 'File Pump');
}

View file

@ -21,6 +21,24 @@ our $I18N = {
context => q|Hover help for bundle name.|
},
'File Pump' => {
message => q|File Pump|,
lastUpdated => 1242439269,
context => q|File Pump is a system for pushing out lots of files at once.|
},
'add a bundle' => {
message => q|Add a Bundle|,
lastUpdated => 1242439269,
context => q|Admin console label. Bundle is a loose set of similar, but not identical objects. Similar to pile.|
},
'Edit Bundle' => {
message => q|Edit Bundle|,
lastUpdated => 1242439269,
context => q|Admin console label. Bundle is a loose set of similar, but not identical objects. Similar to pile.|
},
};
1;