From 8d25a981707ac7e708aca0ed6216c5379a1228f8 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 15 Dec 2006 09:49:34 +0000 Subject: [PATCH] Added navigation gray out if option is not available git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5409 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/images/list_back_gray.png | Bin 0 -> 509 bytes html/images/list_home_gray.png | Bin 0 -> 502 bytes html/images/list_root_gray.png | Bin 0 -> 499 bytes include/class_MultiSelectWindow.inc | 62 ++++++++++++++++++ .../applications/class_divListApplication.inc | 17 +---- .../departments/class_divListDepartment.inc | 21 +++--- plugins/admin/fai/class_divListFai.inc | 24 +------ plugins/admin/groups/class_divListGroup.inc | 17 ++--- plugins/admin/ogroups/class_divListOGroup.inc | 15 +---- plugins/admin/systems/class_divListSystem.inc | 14 ++-- plugins/admin/users/class_divListUsers.inc | 16 ++--- .../blocklists/class_divListBlocklists.inc | 15 +---- .../conference/class_divListConferences.inc | 15 +---- plugins/gofon/macro/class_divListMacros.inc | 15 +---- 14 files changed, 103 insertions(+), 128 deletions(-) create mode 100644 html/images/list_back_gray.png create mode 100644 html/images/list_home_gray.png create mode 100644 html/images/list_root_gray.png diff --git a/html/images/list_back_gray.png b/html/images/list_back_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..df2e987b4647f47f27122098ffee2d288a345bf8 GIT binary patch literal 509 zcmV_8({#3pYOZNk(lHHDa4|s+L#h5grewBrz{Q*LKnvlr4juLI&~}h7j#SU2XrYd zPSqiZIJgv36huTJ#+KlvHBoaU;$6J&Iy7eJGrsS;JiLM~xgg_y3PDNjF5ldzqEkkA zC+Ce=9D^!OLw)uZR(^E{xrbsqk)C9jFwo|N0%tWfv$PEYauHD+PQN4s90AV&j}5-p z+nH5MgVDv_>1hNGWwH!X#K7e-R?l^GtRUV5Wpyg{2xyT7Y>oj?R9SDj8J+Q9tcPm? zWPwY50MO)sTZ~A1LMIiaL4qs*aV9%@&-q9InUV;P8d3fy`A<;llv-TyjW|z$Q_7ve z85(z}imrB@hKLD1@rpr`Y*9v{A<%JJ{+_nq9!Z2=JRrz1{g{k$NSF{IZ0xnbR|($x zKP4X%lT9ovOiWCCepl27>H^^PkY0G29JoIQpP!sm)SR}Hw>5zMtIU_nsFijMmnIg6 zt?HWhRxjr5?wc@cxP4+mrjV-Q?-}RR^De+&*B*$XN6b^;00000NkvXXu0mjffdbLB literal 0 HcmV?d00001 diff --git a/html/images/list_home_gray.png b/html/images/list_home_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..9fb42ffe54e79f54b618c5e66e747c8d31b46ede GIT binary patch literal 502 zcmVwDRB-@>@!$Q=bkXr;C?Z3&Ag3frgUA+c!$k|BMSXzCs87(UUDPLNCul7rXcGkq ziHi_I!HU|LhQ;7ar8bHq%}n=B8ov&?065ASJ#tiDJBDHFBF-+~IlXZD{G3e5TR)^IkFXFX8a{uQ_Q>RVKKIqhG zSyj`IV*1EN1ULG!)2C0J+!v$io26oUJM(s8I|J{34?f%MDD~Ikx*a8-tL5j(-R#1| s_JK`q#r5uJBou_S*j$X)Y)sVQA07#gCFC;eHUIzs07*qoM6N<$f`3Tf>i_@% literal 0 HcmV?d00001 diff --git a/html/images/list_root_gray.png b/html/images/list_root_gray.png new file mode 100644 index 0000000000000000000000000000000000000000..9dffb4e99fdcf1871caceae02dbfa4bd2e81cb99 GIT binary patch literal 499 zcmV!Il$^7LbILXt7c*bGwfJqEs{#iCcKP8mKX$&e)p)cFfYsvI@!xW>5G@Bz5? z1AA`&61u-Np%DpCLjXwtf-XaW4U~w6aJWO`J;DHrM!v}{07Zs?0!4SA5-&(olNqZf z3<3OPo*}~g;u;l!z-qR$%GQ(Iv@rmKLrfq+FG0GoaSrve3L}4>XM2NJc<@jlL<18K z&lF8(RsAOb7Cvj~;qa%oV`y_t&XmjQS*orAT>OvkJ_IUJOSfrI;j&rXcUHCYRK4>i pEa~=um{1}p(rjn-GWRJP;1#K*ig5E@k8l70002ovPDHLkV1j|3)array_Elements[] = $arr; } + + function get_default_header() + { + $enable_back = TRUE; + $enable_root = TRUE; + $enable_home = TRUE; + + $ui = get_userinfo(); + + /* Check if selectedBase = first available base */ + $deps = array(); + foreach($this->config->departments as $dep){ + $deps[] = $dep; + } + + + if(!count($deps) || $deps[0] == $this->selectedBase){ + $enable_back = FALSE; + $enable_root = FALSE; + } + + /* Check if we are in users home department */ + if(!count($deps) ||$this->selectedBase == get_base_from_people($ui->dn)){ + $enable_home = FALSE; + } + + /* Create header with selected base */ + $listhead = "
"; + + /* Draw root button */ + if($enable_root){ + $listhead .= "  "; + }else{ + $listhead .= " "._("Root")." "; + } + + /* Draw back button */ + if($enable_back){ + $listhead .= "  "; + }else{ + $listhead .= " "._("Up")." "; + } + + /* Draw home button */ + if($enable_home){ + $listhead .= "  "; + }else{ + $listhead .= " "._("Home")." "; + } + + /* And at least draw reload button, this button is enabled everytime */ + $listhead .= "  ". + " - "; + + return ($listhead); + } + + /* Add a checkbox to the filter element, the name specifies an existing class var to store the 'selection' */ function AddCheckBox($name,$value="Unset",$string="Unset",$default=false) diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index 56a4b0f5a..834b097e9 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -84,20 +84,9 @@ class divListApplication extends MultiSelectWindow $Copy_Paste =""; } - /* Create listhead, it will be shown on top of the divlist. - * It provides general navigation and object creation - */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". $Copy_Paste. "  ". diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index 4eaea028b..fb3148b99 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -64,18 +64,15 @@ class divListDepartment extends MultiSelectWindow } } - /* Generate list head */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "   ". - "  ". - _("Base")." ". - "  ". - "
"; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); + $listhead.="   ". + "  ". + _("Base")." ". + "  ". + "
"; $this->SetListHeader($listhead); } diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index 3f8f520a8..0a51b32d8 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -111,27 +111,9 @@ class divListFai extends MultiSelectWindow $Copy_Paste =""; } - /* Create listhead, it will be shown on top of the divlist. - * It provides general navigation and object creation - */ - $listhead = - "
 ". - - " ". - - " ". - - " ". - - "  ". - - "\"\" ". - - "  ". "\"\" ". diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index f8139ab58..b2feee42e 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -87,20 +87,15 @@ class divListGroup extends MultiSelectWindow $Copy_Paste =""; } - // Managment - $listhead = " -
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); + $listhead.= "  ". $Copy_Paste. "  ". _("Base")." ". - "  ". + "  ". "
"; $this->SetListHeader($listhead); diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc index 9fc480e26..a40237fac 100755 --- a/plugins/admin/ogroups/class_divListOGroup.inc +++ b/plugins/admin/ogroups/class_divListOGroup.inc @@ -93,18 +93,9 @@ class divListOGroup extends MultiSelectWindow $Copy_Paste =""; } - // Managment - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - " ". $Copy_Paste. "  ". diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 6353c3e4b..9d732b212 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -88,16 +88,10 @@ class divListSystem extends MultiSelectWindow $options.= ""; } } - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - " ". " ". diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index e63142f8a..722760672 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -87,18 +87,10 @@ class divListUsers extends MultiSelectWindow $Copy_Paste =""; } - /* Create header with selected base */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". "  ". diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc index 42e884dc2..745d9b50e 100755 --- a/plugins/gofax/blocklists/class_divListBlocklists.inc +++ b/plugins/gofax/blocklists/class_divListBlocklists.inc @@ -71,18 +71,9 @@ class divListBlocklist extends MultiSelectWindow } } - /* NEW LIST MANAGMENT */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". " ". " "._("Base")." ". diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index 18ee1f7a5..82e74f5bc 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -69,18 +69,9 @@ class divListConference extends MultiSelectWindow } } - /* NEW LIST MANAGMENT */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". "  ". _("Base")." ". diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index 1ab12136f..3d14404e1 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -68,18 +68,9 @@ class divListMacro extends MultiSelectWindow } } - /* NEW LIST MANAGMENT */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  ". - "  ". "  ". _("Base")." ". -- 2.30.2