summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-01 09:02:46 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-01 09:02:46 +0000
commit88a70cbc0420c57b5b989e57de0ee69dbb66ecca (patch)
treecf0651d7ee073248ed4017c9c7252c13f4cf2f18
parente3d7877d7958a0f5df5a8b593eb953ea8e78fa14 (diff)
Clean up styles a bit to make it more obvious what's going on. Show
edit permissions too to demonstrate that we're doing something different for the different type of permissions.
-rw-r--r--core/views/welcome.html.php21
1 files changed, 16 insertions, 5 deletions
diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php
index 1cfd6d7c..7588682d 100644
--- a/core/views/welcome.html.php
+++ b/core/views/welcome.html.php
@@ -133,7 +133,17 @@
font-size: 70%;
font-style: italic;
}
- </style>
+
+ a.allowed {
+ color: green;
+ font-size: 110%;
+ }
+
+ a.denied {
+ color: red;
+ font-size: 90%;
+ }
+</style>
<?= html::script("lib/jquery.js") ?>
<?= html::script("lib/jquery.cookie.js") ?>
<?= html::script("lib/jquery.MultiFile.js") ?>
@@ -341,12 +351,13 @@
<li>
<span class="understate">(<?= $current->album->id ?>)</span>
<?= html::anchor("albums/{$current->album->id}", $current->album->title) ?>
- access:
- <? if (access::can(group::EVERYBODY, "view", $current->album->id)): ?>
- access: <?= html::anchor("welcome/deny_perm/0/view/{$current->album->id}", "yes") ?>
+ <? foreach (array("view", "edit") as $perm): ?>
+ <? if (access::can(group::EVERYBODY, $perm, $current->album->id)): ?>
+ <?= html::anchor("welcome/deny_perm/0/$perm/{$current->album->id}", strtoupper($perm), array("class" => "allowed")) ?>
<? else: ?>
- access: <?= html::anchor("welcome/add_perm/0/view/{$current->album->id}", "no") ?>
+ <?= html::anchor("welcome/add_perm/0/$perm/{$current->album->id}", strtolower($perm), array("class" => "denied")) ?>
<? endif ?>
+ <? endforeach ?>
<? $stack[] = "CLOSE"; ?>
<? if ($current->children): ?>
<? $stack = array_merge($stack, $current->children) ?>