Provide a new permission screen that uses the jquery sprites as the icons. At some point will look to merge this permission screen into core.
This commit is contained in:
parent
ff0afc9e47
commit
94c3a5bd63
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
<? foreach ($permissions as $permission): ?>
|
<? foreach ($permissions as $permission): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td> <?= t($permission->display_name) ?>
|
<td> <?= t($permission->display_name) ?></td>
|
||||||
</td>
|
|
||||||
<? foreach ($groups as $group): ?>
|
<? foreach ($groups as $group): ?>
|
||||||
<? $intent = access::group_intent($group, $permission->name, $item) ?>
|
<? $intent = access::group_intent($group, $permission->name, $item) ?>
|
||||||
<? $allowed = access::group_can($group, $permission->name, $item) ?>
|
<? $allowed = access::group_can($group, $permission->name, $item) ?>
|
||||||
@ -20,33 +19,64 @@
|
|||||||
|
|
||||||
<? if ($lock): ?>
|
<? if ($lock): ?>
|
||||||
<td class="g-denied">
|
<td class="g-denied">
|
||||||
<a href="javascript:show(<?= $lock->id ?>)" title="<?= t('denied and locked through parent album, click to go to parent album')->for_html_attr() ?>" class="ui-icon ui-icon-locked" />
|
<a href="javascript:return false;"
|
||||||
|
title="<?= t('denied and locked through parent album')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-cancel g-passive" />
|
||||||
|
<a href="javascript:show(<?= $lock->id ?>)"
|
||||||
|
title="<?= t('denied and locked through parent album, click to go to parent album')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-locked" />
|
||||||
</td>
|
</td>
|
||||||
<? else: ?>
|
<? else: ?>
|
||||||
<? if ($intent === access::INHERIT): ?>
|
<? if ($intent === access::INHERIT): ?>
|
||||||
<? if ($allowed): ?>
|
<? if ($allowed): ?>
|
||||||
<td class="g-allowed">
|
<td class="g-allowed">
|
||||||
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)" title="<?= t('allowed through parent album, click to deny')->for_html_attr() ?>" class="ui-icon ui-icon-check" />
|
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
|
title="<?= t('allowed through parent album, click to allow explicitly')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-check" />
|
||||||
|
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
|
title="<?= t('click to deny')->for_html_attr() ?>"
|
||||||
|
class="ui-disabled ui-icon ui-icon-cancel" />
|
||||||
</td>
|
</td>
|
||||||
<? else: ?>
|
<? else: ?>
|
||||||
<td class="g-denied">
|
<td class="g-denied">
|
||||||
|
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
|
title="<?= t('click to allow')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-check" />
|
||||||
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
title="<?= t('denied through parent album, click to allow')->for_html_attr() ?>"
|
title="<?= t('denied through parent album, click to deny explicitly')->for_html_attr() ?>"
|
||||||
class="ui-icon ui-icon-cancel" />
|
class="ui-disabled ui-icon ui-icon-cancel" />
|
||||||
</td>
|
</td>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
|
|
||||||
<? elseif ($intent === access::DENY): ?>
|
<? elseif ($intent === access::DENY): ?>
|
||||||
<td class="g-denied">
|
<td class="g-denied">
|
||||||
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
title="<?= t('denied, click to allow')->for_html_attr() ?>"
|
title="<?= t('click to allow')->for_html_attr() ?>"
|
||||||
class="ui-icon ui-icon-cancel" />
|
class="ui-icon ui-icon-check" />
|
||||||
|
<? if ($item->id == 1): ?>
|
||||||
|
<a href="javascript:return false;"
|
||||||
|
title="<?= t('denied')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-cancel g-passive" />
|
||||||
|
<? else: ?>
|
||||||
|
<a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
|
title="<?= t('denied, click to reset')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-cancel" />
|
||||||
|
<? endif ?>
|
||||||
</td>
|
</td>
|
||||||
<? elseif ($intent === access::ALLOW): ?>
|
<? elseif ($intent === access::ALLOW): ?>
|
||||||
<td class="g-allowed">
|
<td class="g-allowed">
|
||||||
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
<? if ($item->id == 1): ?>
|
||||||
class="ui-icon ui-icon-check"
|
<a href="javascript:return false;"
|
||||||
title="<?= t('allowed, click to deny')->for_html_attr() ?>" />
|
title="<?= t('allowed')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-check g-passive" />
|
||||||
|
<? else: ?>
|
||||||
|
<a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
|
title="<?= t('allowed, click to reset')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-check" />
|
||||||
|
<? endif ?>
|
||||||
|
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
||||||
|
title="<?= t('click to deny')->for_html_attr() ?>"
|
||||||
|
class="ui-icon ui-icon-cancel" />
|
||||||
</td>
|
</td>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
|
@ -433,14 +433,27 @@ td {
|
|||||||
|
|
||||||
.g-allowed a {
|
.g-allowed a {
|
||||||
background-image: url("themeroller/images/ui-icons_<?= $iconColorHighlight ?>_256x240.png") !important;
|
background-image: url("themeroller/images/ui-icons_<?= $iconColorHighlight ?>_256x240.png") !important;
|
||||||
|
display:inline-block;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.g-denied a {
|
.g-denied a {
|
||||||
background-image: url("themeroller/images/ui-icons_<?= $iconColorError ?>_256x240.png") !important;
|
background-image: url("themeroller/images/ui-icons_<?= $iconColorError ?>_256x240.png") !important;
|
||||||
|
display:inline-block;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.g-denied a.g-passive,
|
||||||
|
.g-allowed a.g-passive {
|
||||||
|
filter:Alpha(Opacity=35);
|
||||||
|
opacity: .55;
|
||||||
|
}
|
||||||
|
|
||||||
|
#g-permissions .g-active a {
|
||||||
|
border: 1px solid #<?= $borderColorActive ?>;
|
||||||
|
background: #<?= $bgColorActive ?>;
|
||||||
|
}
|
||||||
|
|
||||||
/** *******************************************************************
|
/** *******************************************************************
|
||||||
* 5) Navigation and menus
|
* 5) Navigation and menus
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
Reference in New Issue
Block a user