From 5cf4608825e90d40ae7a98c2f4d1fe557c6f863a Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 24 Nov 2005 06:31:36 +0000 Subject: [PATCH] Added new range selector behavior git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2028 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/addressbook/class_addressbook.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc index 5d5a24a9b..a35a4d597 100644 --- a/plugins/addons/addressbook/class_addressbook.inc +++ b/plugins/addons/addressbook/class_addressbook.inc @@ -17,6 +17,8 @@ class addressbook extends plugin var $storage_base= ""; var $orig_storage_base= ""; + var $range = 20; + var $sn= ""; var $cn= ""; var $givenName= ""; @@ -478,7 +480,12 @@ $this->telephone_list[$attrs['sn'][0].$attrs['dn']]= $smarty->assign("storage_info", _("Creating new entry in")); } } else { - $range= 20; + + + if(isset($_POST['EntryPerPage'])){ + $this->range = $_POST['EntryPerPage']; + } + $range = $this->range; $smarty->assign("internal", 1); } if (isset($_GET['start'])){ @@ -500,10 +507,15 @@ $this->telephone_list[$attrs['sn'][0].$attrs['dn']]= } $output.= "\n$val\n"; } + $smarty->assign("search_result", $output); $smarty->assign("apply", apply_filter()); $smarty->assign("alphabet", $alphabet); - $smarty->assign("range_selector", range_selector(count($this->telephone_list), $this->start, $range)); + if($range < 20){ + $smarty->assign("range_selector", range_selector(count($this->telephone_list), $this->start, $range)); + }else{ + $smarty->assign("range_selector", range_selector(count($this->telephone_list), $this->start, $range, "EntryPerPage")); + } $tmp= array("*" => _("All"), "sn" => _("Name"), "givenName" => _("Given name"), "telephoneNumber" => _("Work phone"), "mobile" => _("Cell phone"), "homePhone" => _("Home phone"), "uid" => _("User ID")); -- 2.30.2