[icinga-checkins] icinga.org: icingaweb2-module-director/master: ActionController: provide central table helpers

git at icinga.org git at icinga.org
Sun Feb 28 17:12:39 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: bc95c25d96c872aeb70af4d514277b1ccbe5f026
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=bc95c25d96c872aeb70af4d514277b1ccbe5f026

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Feb 28 01:16:13 2016 +0100

ActionController: provide central table helpers

---

 application/controllers/ListController.php           |   13 -------------
 library/Director/Web/Controller/ActionController.php |   13 +++++++++++++
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/application/controllers/ListController.php b/application/controllers/ListController.php
index 8f2eb8f..d29b908 100644
--- a/application/controllers/ListController.php
+++ b/application/controllers/ListController.php
@@ -179,17 +179,4 @@ class ListController extends ActionController
             // $api->wipeInactiveStages();
         }
     }
-
-    protected function prepareTable($name)
-    {
-        $table = $this->loadTable($name)->setConnection($this->db());
-        $this->view->filterEditor = $table->getFilterEditor($this->getRequest());
-        $this->view->table = $this->applyPaginationLimits($table);
-        return $this;
-    }
-
-    protected function prepareAndRenderTable($name)
-    {
-        $this->prepareTable($name)->render('table');
-    }
 }
diff --git a/library/Director/Web/Controller/ActionController.php b/library/Director/Web/Controller/ActionController.php
index d71724c..0ac0b00 100644
--- a/library/Director/Web/Controller/ActionController.php
+++ b/library/Director/Web/Controller/ActionController.php
@@ -147,6 +147,19 @@ abstract class ActionController extends Controller
         return $this->view->tabs;
     }
 
+    protected function prepareTable($name)
+    {
+        $table = $this->loadTable($name)->setConnection($this->db());
+        $this->view->filterEditor = $table->getFilterEditor($this->getRequest());
+        $this->view->table = $this->applyPaginationLimits($table);
+        return $this;
+    }
+
+    protected function prepareAndRenderTable($name)
+    {
+        $this->prepareTable($name)->render('list/table', null, true);
+    }
+
     protected function api($endpointName = null)
     {
         if ($this->api === null) {



More information about the icinga-checkins mailing list