diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-01 00:43:22 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-01 00:43:22 +0000 |
commit | 540e4ed9eb6df5955a58ea9946049a84efa67e33 (patch) | |
tree | cb6006ba0efb79eac7e4144f2204c225990a73dd /core | |
parent | a542f705518918b763b27a222ceef8c65d1862a3 (diff) |
Turn the permission dialog into a real 3-state faux checkbox. If we
replace them with intuitive icons, we're most of the way there.
Diffstat (limited to 'core')
-rw-r--r-- | core/views/permissions_form.html.php | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/core/views/permissions_form.html.php b/core/views/permissions_form.html.php index d0b605e2..8c72bc94 100644 --- a/core/views/permissions_form.html.php +++ b/core/views/permissions_form.html.php @@ -20,30 +20,24 @@ <? $lock = access::locked_by($group, $permission->name, $item) ?> <? if ($lock): ?> - - <? if ($allowed): ?> - allowed - <? else: ?> - denied - <? endif ?> - - <a href="javascript:show(<?= $lock->id ?>)">(parental lock)</a> - <? else: ?> - - <? if ($allowed): ?> - <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed</a> + denied and locked by <a href="javascript:show(<?= $lock->id ?>)">parent</a> <? else: ?> - <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">denied</a> - <? endif ?> - - <? if ($intent === null): ?> - (from parent) - <? else: ?> - <? if ($item->id != 1): ?> - <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">(reset to parent)</a> - <? endif ?> - <? endif ?> - + <? if ($intent === null): ?> + <? if ($allowed): ?> + <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed by parent</a> + <? else: ?> + <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">denied by parent</a> + <? endif ?> + </a> + <? elseif ($intent === access::DENY): ?> + <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">denied</a> + <? elseif ($intent === access::ALLOW): ?> + <? if ($item->id == 1): ?> + <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed</a> + <? else: ?> + <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)">allowed</a> + <? endif ?> + <? endif ?> <? endif ?> </td> <? endforeach ?> |