summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-15 01:25:11 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-15 01:25:11 +0000
commit75cf17d0d66af81ef9f2c0d742114ffa27c31861 (patch)
treebb2ab344ea83d5e92262ea2d65b6e25372e57314 /core
parent5b8722f7cb6e55f041061cdc16792ba15427111a (diff)
Make denied links not clickable at the root level when the permission
is already denied. Ie, at the root level you can't click the item to reset because there's no permission to inherit from, so denied is now just a non-actionable status.
Diffstat (limited to 'core')
-rw-r--r--core/views/permissions_form.html.php53
1 files changed, 24 insertions, 29 deletions
diff --git a/core/views/permissions_form.html.php b/core/views/permissions_form.html.php
index 81d8cb7c..3dbd0d98 100644
--- a/core/views/permissions_form.html.php
+++ b/core/views/permissions_form.html.php
@@ -52,42 +52,37 @@
</a>
</td>
<? endif ?>
-
+
<? 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>
- <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>
- <? elseif ($intent === access::ALLOW): ?>
- <? // skip over the "allowed/denied by parent" state when we're setting permissions on ?>
- <? // the root album, since it has no parent. ?>
- <? if ($item->id == 1): ?>
- <td class="gAllowed">
- <span>
- <img src="<?= url::file('themes/default/images/ico-success.png') ?>" title="allowed" alt="<?= t('allowed icon') ?>" />
- </span>
- <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 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>
- </td>
- <? else: ?>
- <td class="gAllowed">
+ <? endif ?>
+ </td>
+ <? elseif ($intent === access::ALLOW): ?>
+ <td class="gAllowed">
+ <? if ($item->id == 1): ?>
+ <img src="<?= url::file('themes/default/images/ico-success.png') ?>" title="allowed" alt="<?= t('allowed icon') ?>" />
+ <? 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>
- <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>
- <? endif ?>
+ <? 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>
<? endif ?>
<? endif ?>
</td>