the template method no longer displays the "manage templates" link if you don't have the privileges to do so.
This commit is contained in:
parent
e828ff8663
commit
912a0a975b
1 changed files with 10 additions and 8 deletions
|
|
@ -1522,7 +1522,7 @@ sub submit {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 template ( name [, value, label, namespace, return, extras, uiLevel ] )
|
=head2 template ( name [, value, label, namespace, afterEdit, extras, uiLevel ] )
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
@ -1532,13 +1532,15 @@ sub template {
|
||||||
my ($name, $value, $label, $namespace, $afterEdit, $extras, $uiLevel) =
|
my ($name, $value, $label, $namespace, $afterEdit, $extras, $uiLevel) =
|
||||||
rearrange([qw(name value label namespace afterEdit extras uiLevel)], @p);
|
rearrange([qw(name value label namespace afterEdit extras uiLevel)], @p);
|
||||||
if (_uiLevelChecksOut($uiLevel)) {
|
if (_uiLevelChecksOut($uiLevel)) {
|
||||||
if ($afterEdit) {
|
if (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||||
$subtext = '<a href="'.WebGUI::URL::page("op=editTemplate&tid=".$value."&namespace=".$namespace
|
if ($afterEdit) {
|
||||||
."&afterEdit="
|
$subtext = '<a href="'.WebGUI::URL::page("op=editTemplate&tid=".$value."&namespace=".$namespace
|
||||||
.WebGUI::URL::escape($afterEdit)).'">'.WebGUI::International::get(741).'</a> / ';
|
."&afterEdit="
|
||||||
}
|
.WebGUI::URL::escape($afterEdit)).'">'.WebGUI::International::get(741).'</a> / ';
|
||||||
$subtext .= '<a href="'.WebGUI::URL::page("op=listTemplates&namespace=$namespace").'">'
|
}
|
||||||
.WebGUI::International::get(742).'</a>';
|
$subtext .= '<a href="'.WebGUI::URL::page("op=listTemplates&namespace=$namespace").'">'
|
||||||
|
.WebGUI::International::get(742).'</a>';
|
||||||
|
}
|
||||||
$output = WebGUI::Form::template({
|
$output = WebGUI::Form::template({
|
||||||
"name"=>$name,
|
"name"=>$name,
|
||||||
"value"=>$value,
|
"value"=>$value,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue