}
$canEdit = $acl->canEdit($folder, $GLOBALS['registry']->getAuth());
+ $canEdit = false;
+
+ if (!$canEdit) {
+ $GLOBALS['notification']->push(_("You do not have permission to change access to this folder."), 'horde.warning');
+ }
+
+ if (!count($curr_acl)) {
+ $GLOBALS['notification']->push(_("The current list of users with access to this folder could not be retrieved."), 'horde.warning');
+ }
+
$t = $GLOBALS['injector']->createInstance('Horde_Template');
$t->setOption('gettext', true);
$t->set('options', IMP::flistSelect(array('selected' => $folder)));
$t->set('current', sprintf(_("Current access to %s"), IMP::displayFolder($folder)));
$t->set('folder', IMP::formMbox($folder, true));
- $t->set('noacl', !count($curr_acl));
+ $t->set('hasacl', count($curr_acl));
$t->set('maxrule', 1);
if (!$t->get('noacl')) {
<h3><tag:current /></h3>
</div>
-<table cellspacing="0" width="100%">
-<if:noacl>
- <tr>
- <td colspan="<tag:maxrule />" class="item leftAlign">
- <em><strong> <gettext>The current list of users with access to this folder could not be retrieved.</gettext></strong></em>
- </td>
- <td></td>
- </tr>
-<else:noacl>
+<table class="prefsAclTable">
+<if:hasacl>
<tr>
<th class="item" width="<tag:width />">
<h4><strong><gettext>User</gettext></strong></h4>
</td>
</loop:rights>
</tr>
-<tr>
- <td></td>
-</tr>
-<else:canedit>
-<tr>
- <td colspan="<tag:maxrule />" class="item leftAlign">
- <em><strong><gettext>You do not have permission to change access to this folder.</gettext></strong></em>
- </td>
- <td></td>
-</tr>
-</else:canedit></if:canedit>
-</else:noacl></if:noacl>
+</if:canedit>
+</if:hasacl>
</table>
<div>