summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a475107)
raw | patch | inline | side by side (parent: a475107)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Jan 2008 08:35:26 +0000 (08:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 24 Jan 2008 08:35:26 +0000 (08:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8580 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/addons/gotomasses/class_gotomasses.inc | patch | blob | history |
diff --git a/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc b/gosa-core/plugins/addons/gotomasses/class_gotomasses.inc
index 4225b18f70d7bd11c6f0703240c84eac1f8238b2..0bafd52128f86e728e4457bc0acdd62a552608f5 100644 (file)
var $sort_by = "QueuePosition";
var $sort_dir = "up";
+ var $range = 25;
+ var $start = 0;
+
function gotomasses(&$config, $dn= NULL)
{
/* Include config object */
$this->divlist->execute();
$entries = $this->get_queued_entries();
$this->divlist->SetEntries($entries);
- return($this->divlist->Draw());
+
+
+ $smarty = get_smarty();
+ $smarty->assign("start",$this->start);
+ $smarty->assign("start_real", ($this->start + 1));
+ $smarty->assign("ranges", array("10" => "10",
+ "20" => "20",
+ "25" => "25",
+ "50" => "50",
+ "100"=> "100",
+ "200"=> "200",
+ "9999" => "*"));
+ $smarty->assign("range",$this->range);
+ $smarty->assign("div",$this->divlist->Draw());
+ return($smarty->fetch (get_template_path('gotomasses.tpl', TRUE, dirname(__FILE__))));
}
function get_queued_entries()
{
- $entries = $this->o_queue->get_queued_entries();
+
+ $start = $this->range * $this->start;
+ $stop = $start + $this->range;
+
+ $entries = $this->o_queue->get_queued_entries($start,$stop);
if(!is_array($entries)){
msg_dialog::display(_("Error"), sprintf(_("Cannot load queue entries: %s"), "<br><br>".$this->o_queue->get_error()), ERROR_DIALOG);
}
$this->sort_by = $sort;
}
+ if(isset($_POST['range']) && is_numeric($_POST['range'])){
+ $this->range = $_POST['range'];
+ }
+ if(isset($_POST['next_page'])){
+ $this->start ++;
+ }
+ if(isset($_POST['last_page'])){
+ $this->start --;
+ if($this->start < 0 ){
+ $this->start = 0;
+ }
+ }
}