ACL management page tweaks
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 21 Oct 2010 05:58:03 +0000 (23:58 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 21 Oct 2010 05:58:03 +0000 (23:58 -0600)
imp/lib/Prefs/Ui.php
imp/templates/prefs/acl.html
imp/themes/screen.css

index 9ef43af..1ee767d 100644 (file)
@@ -705,13 +705,23 @@ class IMP_Prefs_Ui
         }
         $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')) {
index b7d4786..5e6bb30 100644 (file)
@@ -4,15 +4,8 @@
  <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>
index 0d2269f..35e9ead 100644 (file)
@@ -458,6 +458,11 @@ table.searchesmanagement .vfolderenabled {
     padding: 5px 10px;
 }
 
+.prefsAclTable {
+    padding-bottom: 8px;
+    width: 100%;
+}
+
 /* Quota styles. */
 .quotawarn {
     color: #000;