From 2699a906c02647e43afff9b8b9ec39afff57a3b5 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 8 Aug 2007 11:21:36 +0000 Subject: [PATCH] Updated lsit summary, replaced text with images git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7001 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/include/focus.js | 6 ++ .../applications/class_divListApplication.inc | 13 ++-- .../departments/class_divListDepartment.inc | 5 +- plugins/admin/fai/class_divListFai.inc | 56 +++++++--------- plugins/admin/groups/class_divListGroup.inc | 16 +++-- .../mimetypes/class_divListMimeTypes.inc | 14 ++-- plugins/admin/ogroups/class_divListOGroup.inc | 16 +++-- plugins/admin/systems/class_divListSystem.inc | 66 ++++++++----------- plugins/admin/users/class_divListUsers.inc | 23 ++++--- .../blocklists/class_divListBlocklists.inc | 16 +++-- .../conference/class_divListConferences.inc | 15 +++-- plugins/gofon/macro/class_divListMacros.inc | 16 +++-- 12 files changed, 148 insertions(+), 114 deletions(-) diff --git a/html/include/focus.js b/html/include/focus.js index edc7cda7f..f01d1046c 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -330,6 +330,12 @@ function adjust_height(e) { suggested= inner_height-230; } } + + /* Reduce height if a list footer is set */ + if(document.getElementById("t_scrollfoot")){ + suggested = suggested -20; + } + document.getElementById("d_scrollbody").style.height=suggested+"px"; } return true; diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index b9f19be1a..3cfeea35d 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -295,10 +295,15 @@ class divListApplication extends MultiSelectWindow $num_deps = count($this->Added_Departments); } $num_apps = count($list); - $str = $num_apps." "; - $num_apps != 1 ? $str.=_("Applications").", " : $str .= _("Application").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + + $num_app_str = _("Number of listed applications"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_app_str." ".$num_apps."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + $this->set_List_Bottom_Info($str); } diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index d5281bfe1..97a913380 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -202,8 +202,9 @@ class divListDepartment extends MultiSelectWindow /* Create summary string for list footer */ $num_deps=count($list); - $str = $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + $num_dep_str = _("Number of listed departments"); + $str = "".$num_dep_str." ".$num_deps."    "; $this->set_List_Bottom_Info($str); } diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index d69371690..d586dec92 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -349,38 +349,32 @@ class divListFai extends MultiSelectWindow $num_deps = count($this->Added_Departments); } - /* Profile */ - $str = $cnts['FAIprofile']." "; - $cnts['FAIprofile'] != 1 ? $str.=_("Profiles").", " : $str .= _("Profile").", "; - - /* Scripts */ - $str.= $cnts['FAIpartitionTable']." "; - $cnts['FAIpartitionTable'] != 1 ? $str.=_("Partitions").", " : $str .= _("Partition").", "; - - /* Scripts */ - $str.= $cnts['FAIscript']." "; - $cnts['FAIscript'] != 1 ? $str.=_("Scripts").", " : $str .= _("Script").", "; - - /* Hooks */ - $str.= $cnts['FAIhook']." "; - $cnts['FAIhook'] != 1 ? $str.=_("Hooks").", " : $str .= _("Hook").", "; - - /* Variables */ - $str.= $cnts['FAIvariable']." "; - $cnts['FAIvariable'] != 1 ? $str.=_("Variables").", " : $str .= _("Variable").", "; - - /* Templates */ - $str.= $cnts['FAItemplate']." "; - $cnts['FAItemplate'] != 1 ? $str.=_("Templates").", " : $str .= _("Template").", "; - - /* Packages */ - $str.= $cnts['FAIpackageList']." "; - $cnts['FAIpackageList'] != 1 ? $str.=_("Package lists").", ": $str .= _("Package list").", "; - - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + $profile_str = _("Number of listed profiles"); + $partition_str = _("Number of listed partitions"); + $script_str = _("Number of listed scripts"); + $hook_str = _("Number of listed hooks"); + $variable_str = _("Number of listed variables"); + $template_str = _("Number of listed templates"); + $package_str = _("Number of listed packages"); + $dep_str = _("Number of listed departments"); + + $str = "".$profile_str." ".$cnts['FAIprofile']."    "; + $str.= "".$partition_str." ".$cnts['FAIpartitionTable']."    "; + $str.= "".$script_str." ".$cnts['FAIscript']."    "; + $str.= "".$hook_str." ".$cnts['FAIhook']."    "; + $str.= "".$variable_str." ".$cnts['FAIvariable']."    "; + $str.= "".$template_str." ".$cnts['FAItemplate']."    "; + $str.= "".$package_str." ".$cnts['FAIpackageList']."    "; + $str.= "".$dep_str." ".$num_deps."    "; $this->set_List_Bottom_Info($str); - } function Save() diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index 79337f805..a4aa79333 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -321,12 +321,18 @@ class divListGroup extends MultiSelectWindow if(!$this->SubSearch){ $num_deps = count($this->Added_Departments); } - $num_groups = count($groups); - $str = $num_groups." "; - $num_groups != 1 ? $str.=_("Groups").", " : $str .= _("Group").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + $num_grps = count($groups); + + $num_grp_str = _("Number of listed groups"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_grp_str." ".$num_grps."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + $this->set_List_Bottom_Info($str); + } function Save() diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index 58e319193..cf5f165f7 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -295,16 +295,22 @@ class divListMimeTypes extends MultiSelectWindow $this->AddElement(array($field0,$field1,$field2,$field3)); } + /* Create summary string for list footer */ $num_deps=0; if(!$this->SubSearch){ $num_deps = count($this->Added_Departments); } $num_objs = count($list); - $str = $num_objs." "; - $num_objs != 1 ? $str.=_("Mimetypes").", " : $str .= _("Mimetype").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + + $num_obj_str = _("Number of listed mimetypes"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_obj_str." ".$num_objs."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + $this->set_List_Bottom_Info($str); } diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc index 8b460ef6c..d9f243fa8 100755 --- a/plugins/admin/ogroups/class_divListOGroup.inc +++ b/plugins/admin/ogroups/class_divListOGroup.inc @@ -285,17 +285,23 @@ class divListOGroup extends MultiSelectWindow $this->AddElement(array($field0,$field1,$field2,$field3,$field4)); } - + + /* Create summary string for list footer */ $num_deps=0; if(!$this->SubSearch){ $num_deps = count($this->Added_Departments); } $num_objs = count($list); - $str = $num_objs." "; - $num_objs != 1 ? $str.=_("Object groups").", " : $str .= _("Object group").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + + $num_obj_str = _("Number of listed object groups"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_obj_str." ".$num_objs."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + $this->set_List_Bottom_Info($str); } diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 894b73aa1..1bc74b72d 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -426,46 +426,36 @@ class divListSystem extends MultiSelectWindow $num_deps = count($this->Added_Departments); } - $str =""; + $num_ser_str = _("Number of listed servers"); + $num_ws_str = _("Number of listed workstations"); + $num_ter_str = _("Number of listed terminals"); + $num_pho_str = _("Number of listed phones"); + $num_prt_str = _("Number of listed printers"); + $num_com_str = _("Number of listed network components"); + $num_new_str = _("Number of listed new devices"); + $num_wws_str = _("Number of listed windows workstations"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_ser_str." ".$cnts['server']."    "; + $str.= "".$num_ws_str." ".$cnts['workstation']."    "; + $str.= "".$num_ter_str." ".$cnts['terminal']."    "; + $str.= "".$num_pho_str." ".$cnts['phone']."    "; + $str.= "".$num_prt_str." ".$cnts['printer']."    "; + $str.= "".$num_com_str." ".$cnts['component']."    "; + $str.= "".$num_new_str." ".$cnts['NewDevice']."    "; + $str.= "".$num_wws_str." ".$cnts['winstation']."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; - /* Servers */ - $str.= $cnts['server']." "; - $cnts['server'] != 1 ? $str.=_("Servers").", " : $str .= _("Server").", "; - - /* Workstations */ - $str.= $cnts['workstation']." "; - $cnts['workstation'] != 1 ? $str.=_("Workstations").", ": $str .= _("Workstation").", "; - - /* Terminals */ - $str.= $cnts['terminal']." "; - $cnts['terminal'] != 1 ? $str.=_("Terminals").", " : $str .= _("Terminal").", "; - - /* Phones */ - $str.= $cnts['phone']." "; - $cnts['phone'] != 1 ? $str.=_("Phones").", " : $str .= _("Phone").", "; - - /* Printer */ - $str.= $cnts['printer']." "; - $cnts['printer'] != 1 ? $str.=_("Printers").", " : $str .= _("Printer").", "; - - /* Components */ - $str.= $cnts['component']." "; - $cnts['component'] != 1 ? $str.=_("Components").", " : $str .= _("Component").", "; - - /* New devices */ - $str.= $cnts['NewDevice']." "; - $cnts['NewDevice'] != 1 ? $str.=_("New devices").", " : $str .= _("New device").", "; - - /* Windows workstations */ - $str.= $cnts['winstation']." "; - $cnts['winstation'] != 1 ? $str.=_("Windows workstations").", " : $str .= _("Windows workstation").", "; - - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); $this->set_List_Bottom_Info($str); - - - } diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index 2c42f304c..b1d5d201e 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -366,18 +366,23 @@ class divListUsers extends MultiSelectWindow $users[strtolower( $val['sn']['0'].$val['uid']['0'])]=$add; } } - - /* Create summary string for list footer */ + + + /* Create summary string for list footer */ $num_deps=0; - if(!$this->SubSearch){ + if(!$this->SubSearch){ $num_deps = count($this->Added_Departments); } - $str = $num_users." "; - $num_users != 1 ? $str.=_("Users").", " : $str .= _("User").", "; - $str.= $num_templates." "; - $num_templates != 1 ? $str.=_("Templates").", " : $str .= _("Template").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + $num_users = count($list); + + $num_user_str = _("Number of listed users"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_user_str." ".$num_users."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + $this->set_List_Bottom_Info($str); } diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc index fb27fd229..2e78c656b 100755 --- a/plugins/gofax/blocklists/class_divListBlocklists.inc +++ b/plugins/gofax/blocklists/class_divListBlocklists.inc @@ -230,12 +230,18 @@ class divListBlocklist extends MultiSelectWindow if(!$this->SubSearch){ $num_deps = count($this->Added_Departments); } - $num_lists = count($list); - $str = $num_lists." "; - $num_lists != 1 ? $str.=_("Blocklists").", " : $str .= _("Blocklist").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + $num_objs = count($list); + + $num_obj_str = _("Number of listed blocklists"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_obj_str." ".$num_objs."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + $this->set_List_Bottom_Info($str); + } function Save() diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index 3b7514f5c..c6632864d 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -286,11 +286,16 @@ class divListConference extends MultiSelectWindow if(!$this->SubSearch){ $num_deps = count($this->Added_Departments); } - $num_lists = count($list); - $str = $num_lists." "; - $num_lists != 1 ? $str.=_("Conferences").", " : $str .= _("Conference").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); + $num_objs = count($list); + + $num_obj_str = _("Number of listed conferences"); + $num_dep_str = _("Number of listed departments"); + + $str = "".$num_obj_str." ".$num_objs."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + $this->set_List_Bottom_Info($str); } diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index 1f17e531c..682e9606a 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -259,13 +259,17 @@ class divListMacro extends MultiSelectWindow if(!$this->SubSearch){ $num_deps = count($this->Added_Departments); } - $num_lists = count($list); - $str = $num_lists." "; - $num_lists != 1 ? $str.=_("Macros").", " : $str .= _("Macro").", "; - $str.= $num_deps." "; - $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department"); - $this->set_List_Bottom_Info($str); + $num_objs = count($list); + + $num_obj_str = _("Number of listed macros"); + $num_dep_str = _("Number of listed departments"); + $str = "".$num_obj_str." ".$num_objs."    "; + $str.= "".$num_dep_str." ".$num_deps."    "; + + $this->set_List_Bottom_Info($str); } function Save() -- 2.30.2