[Tickets #1058] NEW: Complete the options sidebar with configurable applications

bugs at bugs.horde.org bugs at bugs.horde.org
Mon Jan 3 08:21:16 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1058
-----------------------------------------------------------------------
 Ticket     | 1058
 Created By | pier at apache.org
 Summary    | Complete the options sidebar with configurable applications
 Queue      | Horde Base
 Version    | 3.0
 State      | New
 Priority   | 1. Low
 Type       | Enhancement
 Owners     | 
-----------------------------------------------------------------------


pier at apache.org (2005-01-03 08:21) wrote:

The UI for changing the options for (for example) IMP when installed in
Horde is quite difficult to find. One either has to click on the Mail on the
left sidebar and then Options on the top menu, or on the Options on the left
sidebar and then select the appropriate application in a combo box.

Took me 2 hours to find! :-)

This little patch simply puts those applications configurable through horde
as children element of the "Options" menu in the left sidebar, and making
them easier to find for unexperienced users.

--- services/portal/sidebar.php.orig    2005-01-03 16:14:04.720035864 +0000
+++ services/portal/sidebar.php 2005-01-03 16:13:24.556141704 +0000
@@ -151,6 +151,41 @@
                                  'status' => 'active',
                                  'icon' => $registry->getImageDir() .
'/prefs.png',
                                  'url' =>
Horde::applicationUrl('services/prefs.php'));
+
+        /* Get list of customizable applications. */
+        $apps = array();
+        foreach ($registry->applications as $application => $params) {
+            if ($application == 'horde') {
+                continue;
+            }
+
+            // Make sure the app is installed
+            if (!file_exists($registry->get('fileroot', $application))) {
+                continue;
+            }
+
+            if ($params['status'] == 'heading' ||
+                $params['status'] == 'block') {
+                continue;
+            }
+
+            /* Check if the current user has permisson to see this
+             * application, and if the application is active.
+             * Administrators always see all applications. */
+            if ((Auth::isAdmin() && $params['status'] != 'inactive') ||
+                ($registry->hasPermission($application) &&
+                 ($params['status'] == 'active' || $params['status'] ==
'notoolbar'))) {
+                $apps[$application] = _($params['name']);
+            }
+        }
+
+       foreach ($apps as $key => $val) {
+            $menu['options_' . $key] = array('name' => _($val),
+                                             'status' => 'active',
+                                             'menu_parent' => 'options',
+                                             'icon' =>
$registry->get('icon', $key),
+                                             'url' =>
Horde::applicationUrl('services/prefs.php?app=' . $key));
+       }
     }
 
     if (Auth::isAuthenticated()) {





More information about the bugs mailing list