several bug fixes
added asset type icons to toolbar added isAdminOn, switchOnAdmin, and switchOffAdmin subs to WebGUI::Session
This commit is contained in:
parent
e5f55921ab
commit
e9d6c1b4e4
9 changed files with 80 additions and 15 deletions
|
|
@ -338,7 +338,7 @@ sub view {
|
|||
my %var = (
|
||||
isShortcut => 1,
|
||||
'shortcut.content' => $content,
|
||||
'shortcut.label' => WebGUI::International::get('3',"Shortcut");
|
||||
'shortcut.label' => WebGUI::International::get('3',"Shortcut"),
|
||||
originalURL => $self->getShortcut->getUrl
|
||||
);
|
||||
return $self->processTemplate(\%var,$self->getValue("templateId"));
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ sub getEditForm {
|
|||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
# $tabform->getTab("properties")->raw('<input type="hidden" name="op2" value="'.$session{form}{afterEdit}.'" />');
|
||||
if ($session{form}{func} eq "add") {
|
||||
if ($self->getValue("namespace") eq "") {
|
||||
my $namespaces = WebGUI::SQL->buildHashRef("select distinct(namespace),namespace
|
||||
from template order by namespace");
|
||||
$tabform->getTab("properties")->combo(
|
||||
|
|
@ -150,6 +150,10 @@ sub getEditForm {
|
|||
-label=>WebGUI::International::get('namespace','Template'),
|
||||
-value=>$self->getValue("namespace")
|
||||
);
|
||||
$tabform->getTab("meta")->hidden(
|
||||
-name=>"namespace",
|
||||
-value=>$self->getValue("namespace")
|
||||
);
|
||||
}
|
||||
$tabform->getTab("display")->yesNo(
|
||||
-name=>"showInForms",
|
||||
|
|
@ -312,7 +316,11 @@ sub processRaw {
|
|||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
return $self->getParent->view;
|
||||
if (WebGUI::Session::isAdminOn()) {
|
||||
return $self->getToolbar;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -324,6 +332,11 @@ sub www_edit {
|
|||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('edit template', 'Template'));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
return $self->getContainer->www_view;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue