summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-31 04:21:38 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-31 04:21:38 +0000
commit9ad253a2bbd76048934c304c54239b94f45b3809 (patch)
tree8e6c3402fe54b4f2cd7ecc18ece65df3e14c3b80
parent959fa91f49dd0de72c52d58a9ffb65bcf471dcb2 (diff)
Switch from checkboxes to simple anchors so that we can reflect multiple states better
-rw-r--r--core/views/permission_edit.html.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/core/views/permission_edit.html.php b/core/views/permission_edit.html.php
index 9e65b864..332d31ab 100644
--- a/core/views/permission_edit.html.php
+++ b/core/views/permission_edit.html.php
@@ -16,18 +16,16 @@
<td> <?= _($permission->display_name) ?> </td>
<? foreach ($groups as $group): ?>
<td>
- <? $locks = access::locking_items($group, $permission->name, $item) ?>
- <input type="checkbox"
- name="<?= "{$permission->name}_$group->id" ?>"
- value="1"
- <? if (access::group_can($group, $permission->name, $item)): ?> checked="checked" <? endif ?>
- <? if ($locks): ?> disabled="disabled" <? endif ?>
- />
- <? if ($locks): ?>
- Locked by: <!-- Not internationalized because its hard and this is prob. the wrong UI anyway -->
- <? foreach ($locks as $lock): ?>
- <a href="<?= url::site("{$lock->type}s/$lock->id") ?>"><?= $lock->title ?></a>
- <? endforeach ?>
+ <? $locked = access::locking_items($group, $permission->name, $item) ?>
+ <? $allowed = access::group_can($group, $permission->name, $item) ?>
+ <? if ($locked && $allowed): ?>
+ allowed <a href="#">locked</a>
+ <? elseif ($locked && !$allowed): ?>
+ denied <a href="#">locked</a>
+ <? elseif ($allowed): ?>
+ <a href="#">allowed</a>
+ <? elseif (!$allowed): ?>
+ <a href="#">denied</a>
<? endif ?>
</td>
<? endforeach ?>