[dev] options in sidebar

Dominik Gehl dgehl at inverse.ca
Fri Sep 30 11:29:55 PDT 2005


Yes, I just checked out the HEAD code. The new code works also perfectly
in 3.0.5, so if someone else needs this functionality in 3.0.5, you can
apply the following patch

Dominik

--- services/portal/sidebar.php.old     2005-09-30 14:11:04.000000000
-0400
+++ services/portal/sidebar.php 2005-09-30 14:11:44.000000000 -0400
@@ -152,6 +152,36 @@
                                  'status' => 'active',
                                  'icon' => $registry->getImageDir() .
'/prefs.png',
                                  'url' => Horde::applicationUrl
('services/prefs.php'));
+
+        /* Get a list of configurable applications. */
+        $prefs_apps = array();
+        foreach ($registry->applications as $application => $params) {
+            if ($params['status'] == 'heading' ||
+                $params['status'] == 'block' ||
+                !file_exists($registry->get('fileroot', $application)))
{
+                continue;
+            }
+
+            /* Check if the current user has permission 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'))) {
+                $prefs_apps[_($params['name'])] = $application;
+            }
+        }
+
+        ksort($prefs_apps);
+        foreach ($prefs_apps as $name => $app) {
+            $menu['options_' . $app] = array('name' => $name,
+                                             'status' => 'active',
+                                             'menu_parent' =>
'options',
+                                             'icon' => $registry->get
('icon', $app),
+                                             'url' =>
Horde::applicationUrl('services/prefs.php?app=' . $app));
+        }
+
+
     }

     if (Auth::isAuthenticated()) {



On Fri, 2005-09-30 at 14:19 -0400, Kevin M. Myer wrote:
> Quoting Dominik Gehl <dgehl at inverse.ca>:
> 
> > It's there in 3.0.5 ? How do you activate it then ?
> 
> I think its only in HEAD code...
> 
> Kevin
> 
> -- 
> Kevin M. Myer
> Senior Systems Administrator
> Lancaster-Lebanon Intermediate Unit 13  http://www.iu13.org
> 
> 




More information about the dev mailing list