[dev] [PATCH] Hiding the "Layout" menu item in portal.php

Etienne Goyer etienne.goyer at linuxquebec.com
Mon Sep 22 13:09:36 PDT 2003


Hi,

I had a report from a user who was confused about the purpose of the
"Layout" menu item (actually, portal_edit.php).  It made me think that
it may not be approriate to have it displayed when the portal_layout
pref is locked.  Here is a trivial patch to make it happen.

BTW, on an unrelated note, I just got the subtle joke that is naming the
Horde news reader "Troll".  Hehe really funny indeed :-)

-- 
Etienne Goyer                    Linux Québec Technologies Inc.
http://www.LinuxQuebec.com       etienne.goyer at linuxquebec.com
-------------- next part --------------
--- portal.php.orig	Mon Sep 22 15:33:50 2003
+++ portal.php	Mon Sep 22 16:06:34 2003
@@ -48,6 +48,7 @@
 $title = _("My Summary");
 $cssApp = 'app[]=' . implode(ini_get('arg_separator.output') . 'app[]=', $cssApps);
 $js_onLoad = null;
+$layout = $prefs->isLocked('portal_layout');
 require HORDE_TEMPLATES . '/common-header.inc';
 require HORDE_TEMPLATES . '/portal/menu.inc';
 Help::javascript();
--- templates/portal/menu.inc.orig	Mon Sep 22 15:39:06 2003
+++ templates/portal/menu.inc	Mon Sep 22 15:39:53 2003
@@ -9,7 +9,9 @@
 if (isset($show_home) && $show_home) {
     Menu::printItem(Horde::applicationUrl('login.php'), _("Home"), 'horde.gif');
 }
-Menu::printItem(Horde::applicationUrl('portal_edit.php'), _("Layout"), 'prefs.gif');
+if (isset($layout) && $layout) {
+    Menu::printItem(Horde::applicationUrl('portal_edit.php'), _("Layout"), 'prefs.gif');
+}
 if (Auth::isAdmin()) {
     Menu::printItem(Horde::applicationUrl('admin/'), _("Administration"), 'administration.gif');
     Menu::printItem(Horde::applicationUrl('admin/setup.php'), _("Configuration"), 'administration.gif');


More information about the dev mailing list