From ef73ae46fd277f7e814fa9f3e47451327d5ba3f8 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 29 Nov 2010 08:36:17 +0000 Subject: [PATCH] Updated the info Page git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20397 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/ihtml/themes/default/infoPage.tpl | 29 +++++++------------ gosa-core/include/class_pluglist.inc | 4 +-- gosa-core/include/class_tabs.inc | 6 ++++ .../generic/infoPage/class_infoPage.inc | 24 +++++++++++++++ 4 files changed, 43 insertions(+), 20 deletions(-) diff --git a/gosa-core/ihtml/themes/default/infoPage.tpl b/gosa-core/ihtml/themes/default/infoPage.tpl index 295486436..780e3d958 100644 --- a/gosa-core/ihtml/themes/default/infoPage.tpl +++ b/gosa-core/ihtml/themes/default/infoPage.tpl @@ -40,29 +40,22 @@ {/if} - {/if} +{if $plugins != ""}
- -

{t}Management shortcuts{/t}

+ {$plugins} +
+{/if} -[aus gosa.conf, Ansicht wie im icon-Menu, max. 4 Icons nebeneinander] - -
- -

{t}If you need assistance with this interface, please contact your administrative contact{/t}:

- -
-[liste von uids aus gosa.conf, die aufgelöst wird nach:]
- * Hugo Verwalter
-   Mail:  verwalter@where.com
-   Phone: 771
+{if $managersCnt != 0}
+    
+

{t}If you need assistance with this interface, please contact your administrative contact{/t}:

- * Gundula Ver-Walter - Mail: gundula@where.com - Phone: 772 -
+ {foreach from=$managers item=item} + {$item.str} + {/foreach} +{/if}
diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 857e98a31..80d64680e 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -291,9 +291,9 @@ class pluglist // We do it in here to get the string translated. $this->menu .= "\n \n"; } diff --git a/gosa-core/include/class_tabs.inc b/gosa-core/include/class_tabs.inc index da8dc9d76..7affa029d 100644 --- a/gosa-core/include/class_tabs.inc +++ b/gosa-core/include/class_tabs.inc @@ -84,6 +84,12 @@ class tabs $this->by_object[$tab['CLASS']]->parent= &$this; $this->by_object[$tab['CLASS']]->set_acl_category($this->acl_category); } + + // Try to set the current tab to the posted value + if(isset($_GET['pluginTab'])){ + $tab = $_GET['pluginTab']; + if(isset($this->by_name[$tab])) $this->current = $tab; + } } diff --git a/gosa-core/plugins/generic/infoPage/class_infoPage.inc b/gosa-core/plugins/generic/infoPage/class_infoPage.inc index f33c657ad..146dd553c 100644 --- a/gosa-core/plugins/generic/infoPage/class_infoPage.inc +++ b/gosa-core/plugins/generic/infoPage/class_infoPage.inc @@ -14,7 +14,29 @@ class infoPage extends plugin // Detect managers for the current user. $this->managers = $this->detectManagers(); + + // Get plugin list + $this->plugins = $this->getPluginList(); + } + + function getPluginList() + { + $plist = session::get('plist'); + $myAccountID = array_search('MyAccount',$plist->pluginList); + $str = ""; + foreach($this->config->data['TABS']['MYACCOUNTTABS'] as $pluginData){ + $plugin = $pluginData['CLASS']; + $plInfo = call_user_func(array($plugin,'plInfo')); + + + $str .= "
"; + $str .= $plugin; + $str .= "
"; + } + return($str); } + function detectManagers() { @@ -53,6 +75,7 @@ class infoPage extends plugin function execute() { + $this->plugins = $this->getPluginList(); $smarty = get_smarty(); $personalInfoAllowed = FALSE; foreach(array("uid","sn","givenName","street","l","o","ou","jpegPhoto","personalTitle", @@ -72,6 +95,7 @@ class infoPage extends plugin $smarty->assign("personalInfoAllowed", $personalInfoAllowed); $smarty->assign("attrs", $this->attrs); $smarty->assign("managers", $this->managers); + $smarty->assign("plugins", $this->plugins); $smarty->assign("managersCnt", count($this->managers)); return($smarty->fetch(get_template_path("infoPage.tpl"))); } -- 2.30.2