more admin console changes
This commit is contained in:
parent
c2efefbc4c
commit
73fd8fc506
22 changed files with 70 additions and 124 deletions
|
|
@ -58,9 +58,7 @@ sub www_viewActiveSessions {
|
|||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("activeSessions");
|
||||
return $ac->render($output);
|
||||
return WebGUI::AdminConsole->new("activeSessions")->render($output);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -33,11 +33,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("clipboard");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("clipboard");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=manageClipboard'), WebGUI::International::get(949));
|
||||
if ($session{form}{systemClipboard} ne "1") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=emptyClipboard'), WebGUI::International::get(950));
|
||||
|
|
|
|||
|
|
@ -30,11 +30,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("databases");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("databases");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editDatabaseLink&dlid=new'), WebGUI::International::get(982));
|
||||
if (($session{form}{op} eq "editDatabaseLink" && $session{form}{dlid} ne "new") || $session{form}{op} eq "deleteDatabaseLink") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editDatabaseLink&dlid='.$session{form}{dlid}), WebGUI::International::get(983));
|
||||
|
|
|
|||
|
|
@ -44,11 +44,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("groups");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("groups");
|
||||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editGroup&gid=new'), WebGUI::International::get(90));
|
||||
unless ($session{form}{op} eq "listGroups"
|
||||
|
|
|
|||
|
|
@ -47,15 +47,14 @@ sub _seeAlso {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_viewHelp {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(12));
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("help");
|
||||
my $ac = WebGUI::AdminConsole->new("help");
|
||||
my $namespace = $session{form}{namespace} || "WebGUI";
|
||||
my $help = _get($session{form}{hid},$namespace);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=viewHelpIndex'),WebGUI::International::get(95));
|
||||
foreach my $row (@{$help->{related}}) {
|
||||
my $relatedHelp = _get($row->{tag},$row->{namespace});
|
||||
$ac->addSubmenuItem(_link($row->{tag},$row->{namespace}),WebGUI::International::get($relatedHelp->{title},$row->{namespace}));
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=viewHelpIndex'),WebGUI::International::get(95));
|
||||
return $ac->render(
|
||||
WebGUI::Macro::negate(WebGUI::International::get($help->{body},$namespace)),
|
||||
WebGUI::International::get(93).': '.WebGUI::International::get($help->{title},$namespace)
|
||||
|
|
@ -104,9 +103,7 @@ sub www_viewHelpIndex {
|
|||
}
|
||||
}
|
||||
$output .= '</td></tr></table>';
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("help");
|
||||
return $ac->render($output);
|
||||
return WebGUI::AdminConsole->new("help")->render($output);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -48,9 +48,7 @@ sub www_viewLoginHistory {
|
|||
$output .= $p->getPage($session{form}{pn});
|
||||
$output .= '</table>';
|
||||
$output .= $p->getBar($session{form}{pn});
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("loginHistory");
|
||||
return $ac->render($output);
|
||||
return WebGUI::AdminConsole->new("loginHistory")->render($output);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -29,11 +29,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title,"MetaData") if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("contentProfiling");
|
||||
if ($help) {
|
||||
$ac->setHelp($help,"MetaData");
|
||||
}
|
||||
$ac->setAdminFunction("contentProfiling");
|
||||
if($session{form}{op} ne "manageMetaData") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=manageMetaData'), WebGUI::International::get('content profiling','MetaData'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,11 +39,10 @@ sub _submenu {
|
|||
my $i18n = WebGUI::International->new("Navigation");
|
||||
$title = $i18n->get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("navigation");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("navigation");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editNavigation'),$i18n->get("add new"));
|
||||
if (($session{form}{op} eq "editNavigation" && $session{form}{navigationId} ne "new") || $session{form}{op} eq "deleteNavigationConfirm") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editNavigation&identifier='.$session{form}{identifier}), $i18n->get("18"));
|
||||
|
|
|
|||
|
|
@ -51,11 +51,10 @@ sub _submenu {
|
|||
my $help = shift;
|
||||
my $namespace = shift;
|
||||
$title = WebGUI::International::get($title,$namespace) if ($title);
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("userProfiling");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("userProfiling");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editProfileCategory&cid=new"), WebGUI::International::get(490,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editProfileField&fid=new"), WebGUI::International::get(491,"WebGUIProfile"));
|
||||
if ((($session{form}{op} eq "editProfileField" && $session{form}{fid} ne "new") || $session{form}{op} eq "deleteProfileField") && $session{form}{cid} eq "") {
|
||||
|
|
|
|||
|
|
@ -26,11 +26,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("contentFilters");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("contentFilters");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editReplacement&replacementId=new"), WebGUI::International::get(1047));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=listReplacements"), WebGUI::International::get("content filters"));
|
||||
return $ac->render($workarea, $title);
|
||||
|
|
|
|||
|
|
@ -263,10 +263,9 @@ sub www_editSettings {
|
|||
$jscript .= "</script>";
|
||||
$tabform->getTab("auth")->raw($jscript);
|
||||
$tabform->submit();
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("settings");
|
||||
my $ac = WebGUI::AdminConsole->new("settings");
|
||||
$ac->setHelp("settings");
|
||||
return $ac->render($tabform->print);
|
||||
return $ac->render($tabform->print);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ sub _submenu {
|
|||
my $workarea = shift;
|
||||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
$ac->setAdminFunction("statistics");
|
||||
my $ac = WebGUI::AdminConsole->new("statistics");
|
||||
if ($session{setting}{trackPageStatistics}) {
|
||||
$ac->addSubmenuItem( WebGUI::URL::page("op=viewPageReport"), WebGUI::International::get(796));
|
||||
# $ac->addSubmenuItem( WebGUI::URL::page("op=viewTrafficReport"), WebGUI::International::get(797));
|
||||
|
|
|
|||
|
|
@ -32,11 +32,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("templates");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("templates");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editTemplate&tid=new&namespace='.$session{form}{namespace}), WebGUI::International::get(505));
|
||||
if ($session{form}{op} eq "editTemplate" && ($session{form}{tid} ne "new" || $session{form}{op} ne "deleteTemplateConfirm")) {
|
||||
$ac->addSubmenuItem(
|
||||
|
|
|
|||
|
|
@ -50,11 +50,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("themes");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("themes");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editTheme&themeId=new'), WebGUI::International::get(901));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=importTheme'), WebGUI::International::get(924));
|
||||
unless (isIn($session{form}{op}, qw(deleteThemeConfirm viewTheme listThemes)) || $session{form}{themeId} eq "new") {
|
||||
|
|
|
|||
|
|
@ -116,11 +116,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("trash");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("trash");
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=manageTrash'), WebGUI::International::get(10));
|
||||
if ($session{form}{systemTrash} ne "1") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=emptyTrash'), WebGUI::International::get(11));
|
||||
|
|
|
|||
|
|
@ -38,11 +38,10 @@ sub _submenu {
|
|||
my $title = shift;
|
||||
$title = WebGUI::International::get($title) if ($title);
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new;
|
||||
my $ac = WebGUI::AdminConsole->new("users");
|
||||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->setAdminFunction("users");
|
||||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=addUser"), WebGUI::International::get(169));
|
||||
unless ($session{form}{op} eq "listUsers"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue