Fix typo in Group.pm where www_manageUsersInGroup wasn't working.
Add a feature to the Help where the user's UI Level is checked and only fields that he can see are displayed. A URL is provided to override the UI. Article help is updated to work with UI level display.
This commit is contained in:
parent
73dcd7729a
commit
659b164a42
4 changed files with 33 additions and 8 deletions
|
|
@ -10,20 +10,23 @@ our $HELP = {
|
|||
description => 'article template description',
|
||||
namespace => 'Asset_Article',
|
||||
},
|
||||
{
|
||||
title => '7',
|
||||
description => 'link title description',
|
||||
namespace => 'Asset_Article',
|
||||
},
|
||||
{
|
||||
title => '8',
|
||||
description => 'link url description',
|
||||
namespace => 'Asset_Article',
|
||||
uiLevel => 3,
|
||||
},
|
||||
{
|
||||
title => '7',
|
||||
description => 'link title description',
|
||||
namespace => 'Asset_Article',
|
||||
uiLevel => 3,
|
||||
},
|
||||
{
|
||||
title => '10',
|
||||
description => 'carriage return description',
|
||||
namespace => 'Asset_Article',
|
||||
uiLevel => 5,
|
||||
},
|
||||
],
|
||||
related => [
|
||||
|
|
|
|||
|
|
@ -650,7 +650,7 @@ sub www_manageUsersInGroup {
|
|||
value=>"deleteGrouping"
|
||||
});
|
||||
$output .= '<table border="1" cellpadding="2" cellspacing="0"><tr><td class="tableHeader"><input type="image" src="'
|
||||
.WebGUI::Icon::_getBaseURL().'delete.gif" border="0"></td>
|
||||
.$session->icon->_getBaseURL().'delete.gif" border="0"></td>
|
||||
<td class="tableHeader">'.$i18n->get(50).'</td>
|
||||
<td class="tableHeader">'.$i18n->get(369).'</td></tr>';
|
||||
my $p = WebGUI::Paginator->new($session,$session->url->page("op=manageUsersInGroup;gid=".$session->form->process("gid")));
|
||||
|
|
|
|||
|
|
@ -120,13 +120,20 @@ sub www_viewHelp {
|
|||
$ac->addSubmenuItem(_link($session,$row->{tag},$row->{namespace}),$i18n->get($relatedHelp->{title},$row->{namespace}));
|
||||
}
|
||||
my %vars;
|
||||
$vars{uiLevelLabel} = $i18n->get('739', 'WebGUI');
|
||||
$vars{body} = $i18n->get($help->{body});
|
||||
my $userUiLevel = $session->user->profileField("uiLevel");
|
||||
my $uiOverride = $session->form->process("uiOverride");
|
||||
foreach my $row (@{ $help->{fields} }) {
|
||||
push @{ $vars{fields} },
|
||||
{ 'title' => $i18n->get($row->{title},$row->{namespace}),
|
||||
'description' => $i18n->get($row->{description},$row->{namespace}), }
|
||||
{ 'title' => $i18n->get($row->{title},$row->{namespace}),
|
||||
'description' => $i18n->get($row->{description},$row->{namespace}),
|
||||
'uiLevel' => $row->{uiLevel},
|
||||
} if ($uiOverride || ($userUiLevel >= ($row->{uiLevel} || 1)));
|
||||
}
|
||||
my $body = WebGUI::Asset::Template->new($session,"PBtmplHelp000000000001")->process(\%vars);
|
||||
my $uiOverrideText = $uiOverride ? $i18n->get('show my fields','WebGUI') : $i18n->get('show all fields','WebGUI');
|
||||
$ac->addSubmenuItem(_link($session, $session->form->process("hid"), $namespace).";uiOverride=".!$uiOverride, $uiOverrideText) if $userUiLevel < 9;
|
||||
$ac->addSubmenuItem($session->url->page('op=viewHelpIndex'),$i18n->get(95, 'WebGUI'));
|
||||
$ac->addSubmenuItem($session->url->page('op=viewHelpTOC'),$i18n->get('help contents', 'WebGUI'));
|
||||
WebGUI::Macro::process($session,\$body);
|
||||
|
|
|
|||
|
|
@ -247,6 +247,21 @@ our $I18N = {
|
|||
lastUpdated => 1033832377
|
||||
},
|
||||
|
||||
'show all fields' => {
|
||||
message => q|Show all fields|,
|
||||
lastUpdated => 1141184463
|
||||
},
|
||||
|
||||
'show my fields' => {
|
||||
message => q|Show fields my UI level allows|,
|
||||
lastUpdated => 1141184463
|
||||
},
|
||||
|
||||
'739' => {
|
||||
message => q|UI Level|,
|
||||
lastUpdated => 1033832377
|
||||
},
|
||||
|
||||
'992' => {
|
||||
message => q|Title|,
|
||||
lastUpdated => 1056151382
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue