2008-12-31 09:02:40 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
2009-05-28 00:06:09 -07:00
|
|
|
<fieldset>
|
|
|
|
|
<legend> <?= t('Edit Permissions') ?> </legend>
|
2008-12-31 09:02:40 +00:00
|
|
|
|
2009-05-28 00:06:09 -07:00
|
|
|
<table>
|
|
|
|
|
<tr>
|
|
|
|
|
<th> </th>
|
|
|
|
|
<? foreach ($groups as $group): ?>
|
2009-05-31 00:11:48 -07:00
|
|
|
<th> <?= p::clean($group->name) ?> </th>
|
2009-05-28 00:06:09 -07:00
|
|
|
<? endforeach ?>
|
|
|
|
|
</tr>
|
2008-12-31 19:59:42 +00:00
|
|
|
|
2009-05-28 00:06:09 -07:00
|
|
|
<? foreach ($permissions as $permission): ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td> <?= t($permission->display_name) ?> </td>
|
|
|
|
|
<? foreach ($groups as $group): ?>
|
|
|
|
|
<? $intent = access::group_intent($group, $permission->name, $item) ?>
|
|
|
|
|
<? $allowed = access::group_can($group, $permission->name, $item) ?>
|
|
|
|
|
<? $lock = access::locked_by($group, $permission->name, $item) ?>
|
2009-05-15 01:25:11 +00:00
|
|
|
|
2009-05-28 00:06:09 -07:00
|
|
|
<? if ($lock): ?>
|
|
|
|
|
<td class="gDenied">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-denied.png') ?>" title="<?= t('denied and locked through parent album') ?>" alt="<?= t('denied icon') ?>" />
|
|
|
|
|
<a href="javascript:show(<?= $lock->id ?>)" title="<?= t('click to go to parent album') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-lock.png') ?>" alt="<?= t('locked icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
|
<? else: ?>
|
|
|
|
|
<? if ($intent === null): ?>
|
|
|
|
|
<? if ($allowed): ?>
|
|
|
|
|
<td class="gAllowed">
|
|
|
|
|
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
|
|
|
|
title="<?= t('allowed through parent album, click to allow explicitly') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-success-pale.png') ?>" alt="<?= t('passive allowed icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
|
|
|
|
title="<?= t('click to deny') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-denied-gray.png') ?>" alt="<?= t('inactive denied icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
|
<? else: ?>
|
2009-05-14 00:12:46 +00:00
|
|
|
<td class="gDenied">
|
2009-05-15 01:25:11 +00:00
|
|
|
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
|
|
|
|
title="<?= t('click to allow') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-success-gray.png') ?>" alt="<?= t('inactive allowed icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
2009-05-28 00:06:09 -07:00
|
|
|
title="<?= t('denied through parent album, click to deny explicitly') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-denied-pale.png') ?>" alt="<?= t('passive denied icon') ?>" />
|
2009-05-15 01:25:11 +00:00
|
|
|
</a>
|
|
|
|
|
</td>
|
2009-01-01 00:43:22 +00:00
|
|
|
<? endif ?>
|
2009-05-28 00:06:09 -07:00
|
|
|
|
|
|
|
|
<? elseif ($intent === access::DENY): ?>
|
|
|
|
|
<td class="gDenied">
|
|
|
|
|
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
|
|
|
|
title="<?= t('click to allow') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-success-gray.png') ?>" alt="<?= t('inactive allowed icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
<? if ($item->id == 1): ?>
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-denied.png') ?>" alt="<?= t('denied icon') ?>" title="<?= t('denied') ?>"/>
|
|
|
|
|
<? else: ?>
|
|
|
|
|
<a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
|
|
|
|
title="<?= t('denied, click to reset') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-denied.png') ?>" alt="<?= t('denied icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
<? endif ?>
|
|
|
|
|
</td>
|
|
|
|
|
<? elseif ($intent === access::ALLOW): ?>
|
|
|
|
|
<td class="gAllowed">
|
|
|
|
|
<? if ($item->id == 1): ?>
|
2009-06-12 08:18:51 +08:00
|
|
|
<img src="<?= url::file('themes/default/images/ico-success.png') ?>" title="<?= t("allowed") ?>" alt="<?= t('allowed icon') ?>" />
|
2009-05-28 00:06:09 -07:00
|
|
|
<? else: ?>
|
|
|
|
|
<a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
|
|
|
|
title="<?= t('allowed, click to reset') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-success.png') ?>" alt="<?= t('allowed icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
<? endif ?>
|
|
|
|
|
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
|
|
|
|
|
title="<?= t('click to deny') ?>">
|
|
|
|
|
<img src="<?= url::file('themes/default/images/ico-denied-gray.png') ?>" alt="<?= t('inactive denied icon') ?>" />
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
2009-01-01 00:43:22 +00:00
|
|
|
<? endif ?>
|
2009-05-28 00:06:09 -07:00
|
|
|
<? endif ?>
|
|
|
|
|
</td>
|
2008-12-31 09:02:40 +00:00
|
|
|
<? endforeach ?>
|
2009-05-28 00:06:09 -07:00
|
|
|
</tr>
|
|
|
|
|
<? endforeach ?>
|
|
|
|
|
</table>
|
|
|
|
|
</fieldset>
|