summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f806be)
raw | patch | inline | side by side (parent: 6f806be)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 8 Aug 2007 08:31:54 +0000 (08:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 8 Aug 2007 08:31:54 +0000 (08:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6996 594d385d-05f5-0310-b6e9-bd551577e9d8
14 files changed:
index cf91f5601de58d9a1e37407741b2faec74721d24..7bc2eef144db6f6b6304d5464a3d9b202cc9c885 100644 (file)
border:1px solid #AAA;
}
+td.listfooter {
+ background:#E5E5E5;
+ border-top:1px solid #C0C0C0;
+ padding:3px;
+ height:16px;
+}
+
td.scrollhead {
vertical-align:top;
padding:0px;
index db82577f37a044121960f7ac5a4c1597639ea74c..66dad408d6f6548148566558c76bfc624789131a 100644 (file)
var $is_headpage = false; // if true the design changes
var $filterName = "Liste";
var $DepartmentsAdded = false;
+ var $Added_Departments = array();
var $selectedBase = "";
var $DivHeight = "";
var $HideFilterPart = false;
-
+ var $List_Bottom_Info = "";
var $SaveAdditionalVars = array(); // Additional Post vars to store
var $module= "";
$divlist = new divlist($this->string_Title);
$divlist->SetSummary($this->string_Summary);
- $divlist->SetEntriesPerPage(0); // 0 for scrollable list
+ $divlist->SetEntriesPerPage(0); // 0 for scrollable list
+ $divlist->SetFooter($this->get_List_Bottom_Info());
if($this->DivHeight != ""){
$divlist->SetHeight($this->DivHeight);
function AddDepartments($base = false,$numtabs = 3,$empty_tabs_in_front = 0)
{
$this->DepartmentsAdded = true;
+ $this->Added_Departments = array();
/* check for a valid base */
if(!$base){
}
}
$this->AddElement($row);
+ $this->Added_Departments[] = $row;
}
}
+
+ function set_List_Bottom_Info($str)
+ {
+ $this->List_Bottom_Info = $str;
+ }
+
+ function get_List_Bottom_Info()
+ {
+ return($this->List_Bottom_Info);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
index 2c28bc7cfa37525ec75cbddcefd96ffaff19c502..17176b217b9ce96ffbe8d5f2b743a2a0ecc61291 100644 (file)
var $i_entriesPerPage;
var $force_height = false;
+ var $list_footer = "";
// Added php 4 constructor
function divlist($pageid){
}
+ function SetFooter($str)
+ {
+ $this->list_footer = $str;
+ }
+
function AddEntry($a_entriedata) {
$this->a_entries[] = $a_entriedata;
}
}
$s_return.= $this->_generateHeader();
- $s_return.=$this->_generatePage();
-
+ $s_return.= $this->_generatePage();
+ $s_return.= $this->_generateFooter();
$s_return.= "</table>";
return ($s_return);
function _numentries(){
return count($this->a_entries);
}
+
+ function _generateFooter()
+ {
+ $s_return = "";
+ if(!empty($this->list_footer)){
+
+ // Using scrolltable?
+ if($this->i_entriesPerPage == 0) {
+ if(!$this->force_height) {
+ $s_return.= "\n<tr><td class='scrollhead'><table summary='' style='width:100%' cellspacing='0' id='t_scrollfoot'>";
+ } else {
+ $s_return.= "\n<tr><td class='scrollhead'><table summary='' style='width:100%' cellspacing='0' id='t_scrollfoot_onlywidth'>";
+ }
+ }
+ $s_return .= "<tr><td class='listfooter' style='border-bottom:0px;'>".$this->list_footer."</td>";
+ // Attach a 13px-wide column (used as scrollbar space in body-table),
+ // but do this only if we are really using scrolltables.
+ if($this->i_entriesPerPage == 0) {
+ $s_return.= "\n<td class='listfooter' style='width:13px;border-right:0px;'> </td>";
+ $s_return.= "\n</table></td>";
+ }
+
+ $s_return.= "\n</tr>";
+
+ }
+ return($s_return);
+ }
function _generateHeader(){
$s_return = "";
diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc
index ab467d57bc6c2f6385861bd58850c9eac8ccfc13..b9f19be1a88666e9666ec848ced3700dddd2e01f 100755 (executable)
$field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
$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_apps = count($list);
+ $str = $num_apps." ";
+ $num_apps != 1 ? $str.=_("Applications").", " : $str .= _("Application").", ";
+ $str.= $num_deps." ";
+ $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department");
+ $this->set_List_Bottom_Info($str);
}
function Save()
diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc
index 206fca72cf6ab722bcb01b243d4913f3f7a04c72..d5281bfe13358c1407969479b4c66663d7f588c1 100755 (executable)
$this->AddElement( array($field01,$field0,$field1,$field2));
}
- }
+ /* Create summary string for list footer */
+ $num_deps=count($list);
+ $str = $num_deps." ";
+ $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department");
+ $this->set_List_Bottom_Info($str);
+
+ }
function Save()
{
MultiSelectWindow::Save();
index 0e875b081a5ab46ff63a9f0bed0e5583bd3594ba..d693716909f8e14afd77bcfa54be22e506fb66b7 100644 (file)
Attach objects
********************/
+ $cnts = array();
+ foreach($objects as $key => $data){
+ $cnts[$key] = 0;
+ }
+
foreach($list as $key => $value){
$info = "";
$img = "";
$type = $value['type'];
$abort =false;
+ $cnts[$type] ++;
+
if(isset($objects[$type])){
$img = "<img class='center' src='".$objects[$type]['IMG']."' title='".$objects[$type]['NAME']."' alt='".$objects[$type]['KZL']."'>";
$info = $objects[$type]['NAME'];
$field4 = array("string" => preg_replace("/%KEY%/",$key,$acti) , "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
$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);
+ }
+
+ /* 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");
+ $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 3ae13ce89829180647a3a07f767b302f3ede8243..79337f805eb40288c8917fb1bf78bb4b02d193ea 100644 (file)
$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_groups = count($groups);
+ $str = $num_groups." ";
+ $num_groups != 1 ? $str.=_("Groups").", " : $str .= _("Group").", ";
+ $str.= $num_deps." ";
+ $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department");
+ $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 684959a74a171fac1af64044246f833d8d5ae788..58e319193315235c619071ead9d3658d2e42e7de 100755 (executable)
$field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
$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");
+ $this->set_List_Bottom_Info($str);
}
function Save()
diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc
index cc2900d62fe6a4922c7961f4c95ca19c4a614b02..8b460ef6cbdbe07ee1833043120c8c2938d24941 100755 (executable)
$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");
+ $this->set_List_Bottom_Info($str);
}
function Save()
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index aaa977dd14ec39767261998ed5f4a9e2c137a983..894b73aa138413fb18c548930ccb9fe3a4487f74 100644 (file)
"component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component/componentGeneric"));
+ $cnts = array("component" => 0 , "terminal" => 0 , "workstation" => 0 ,
+ "printer" => 0 , "phone" => 0 , "server" => 0,
+ "NewDevice" => 0, "winstation"=> 0);
+
// Test Every Entry and generate divlist Array
foreach($terminals as $key => $val){
}
}
+ $type = $this->parent->get_system_type($val['objectClass']);
+ $cnts[$type] ++;
+
+
/* Create each field */
$field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
"attach" => "style='width:20px;'");
$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);
+ }
+
+ $str ="";
+
+ /* 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 263fd4438a34f4f3a817a113d1ee73c3c0d6cce7..2c42f304c6778cfc84214f1f0a28a132bcc185da 100644 (file)
/********************
Variable init
********************/
+
+ $num_users = 0;
+ $num_templates = 0;
/* Variable initialation */
$enviro = $posix = $maila = $faxac = $samba = $netatalk = "";
if(in_array("gosaUserTemplate",$val['objectClass'])){
$tpl = preg_replace("/%KEY%/", "$key", $tplimg);
$s_img_create_from_template = preg_replace("/%KEY%/", "$key", $tplcreateuserimg);
+ $num_templates ++;
}else{
$s_img_create_from_template = "";
$tpl = $userimg;
+ $num_users ++;
}
/* Insert key into userimg */
$users[strtolower( $val['sn']['0'].$val['uid']['0'])]=$add;
}
}
-
+
+ /* Create summary string for list footer */
+ $num_deps=0;
+ 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");
+ $this->set_List_Bottom_Info($str);
}
function Save()
diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc
index 8106f3594d5dae0a924a9dbf581d7eb5811bcdd5..fb27fd229104e369628e6d180db6a117efb8baf5 100755 (executable)
$field3 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
$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_lists = count($list);
+ $str = $num_lists." ";
+ $num_lists != 1 ? $str.=_("Blocklists").", " : $str .= _("Blocklist").", ";
+ $str.= $num_deps." ";
+ $num_deps != 1 ? $str.=_("Departments") : $str .= _("Department");
+ $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 e249bed8587059fda40567affe34e905e7150702..3b7514f5c26cce67f198750be2e86f4a7c4c749b 100755 (executable)
$this->AddElement(array($field0,$a_field1,$a_field2,$a_field3,$a_field4,$a_field5));
}
+
+ /* Create summary string for list footer */
+ $num_deps=0;
+ 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");
+ $this->set_List_Bottom_Info($str);
}
function Save()
diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc
index fa064b65c3878445fa85bcacf4cfb76c49856b4f..1f17e531c23bc4dcd2838925e694a9aaa6a6edb7 100755 (executable)
$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_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);
+
}
function Save()