[icinga-checkins] icinga.org: icingaweb2-module-director/master: controllers: remove icon tags, use link classes

git at icinga.org git at icinga.org
Mon Feb 29 12:22:34 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Feb 29 12:20:57 2016 +0100

controllers: remove icon tags, use link classes

---

 application/controllers/DataController.php         |   38 ++++++++++----------
 application/controllers/ListController.php         |   24 ++++++-------
 .../Director/Web/Controller/ObjectsController.php  |   13 ++++---
 3 files changed, 38 insertions(+), 37 deletions(-)

diff --git a/application/controllers/DataController.php b/application/controllers/DataController.php
index 86ab964..1dc4410 100644
--- a/application/controllers/DataController.php
+++ b/application/controllers/DataController.php
@@ -8,12 +8,12 @@ class DataController extends ActionController
 {
     public function listsAction()
     {
-        $this->view->addLink = $this->view->icon('plus')
-            . ' '
-            . $this->view->qlink(
-                $this->translate('Add list'),
-                'director/datalist/add'
-            );
+        $this->view->addLink = $this->view->qlink(
+            $this->translate('Add list'),
+            'director/datalist/add',
+            null,
+            array('class' => 'icon-plus')
+        );
 
         $this->setDataTabs()->activate('datalist');
         $this->view->title = $this->translate('Data lists');
@@ -22,12 +22,13 @@ class DataController extends ActionController
 
     public function fieldsAction()
     {
-        $this->view->addLink = $this->view->icon('plus')
-            . ' '
-            . $this->view->qlink(
-                $this->translate('Add field'),
-                'director/datafield/add'
-            );
+        $this->view->addLink = $this->view->qlink(
+            $this->translate('Add field'),
+            'director/datafield/add',
+            null,
+            array('class' => 'icon-plus')
+
+        );
 
         $this->setDataTabs()->activate('datafield');
         $this->view->title = $this->translate('Data fields');
@@ -39,12 +40,13 @@ class DataController extends ActionController
         $listId = $this->params->get('list_id');
         $this->view->lastId = $listId;
 
-        $this->view->addLink = $this->view->icon('plus')
-            . ' '
-            . $this->view->qlink(
-                $this->translate('Add entry'),
-                'director/datalistentry/add' . '?list_id=' . $listId
-            );
+        $this->view->addLink = $this->view->qlink(
+            $this->translate('Add entry'),
+            'director/datalistentry/add' . '?list_id=' . $listId,
+            null,
+            array('class' => 'icon-plus')
+
+        );
 
         $this->view->title = $this->translate('List entries');
         $this->getTabs()->add('editlist', array(
diff --git a/application/controllers/ListController.php b/application/controllers/ListController.php
index 5f498df..699a437 100644
--- a/application/controllers/ListController.php
+++ b/application/controllers/ListController.php
@@ -9,12 +9,12 @@ class ListController extends ActionController
 {
     public function importsourceAction()
     {
-        $this->view->addLink = $this->view->icon('plus')
-            . ' '
-            . $this->view->qlink(
-                $this->translate('Add import source'),
-                'director/importsource/add'
-            );
+        $this->view->addLink = $this->view->qlink(
+            $this->translate('Add import source'),
+            'director/importsource/add',
+            null,
+            array('class' => 'icon-plus')
+        );
 
         $this->setImportTabs()->activate('importsource');
         $this->view->title = $this->translate('Import source');
@@ -31,12 +31,12 @@ class ListController extends ActionController
 
     public function syncruleAction()
     {
-        $this->view->addLink = $this->view->icon('plus')
-            . ' '
-            . $this->view->qlink(
-                $this->translate('Add sync rule'),
-                'director/syncrule/add'
-            );
+        $this->view->addLink = $this->view->qlink(
+            $this->translate('Add sync rule'),
+            'director/syncrule/add',
+            null,
+            array('class' => 'icon-plus')
+        );
 
         $this->setImportTabs()->activate('syncrule');
         $this->view->title = $this->translate('Sync rule');
diff --git a/library/Director/Web/Controller/ObjectsController.php b/library/Director/Web/Controller/ObjectsController.php
index 4bde798..cfbcfd2 100644
--- a/library/Director/Web/Controller/ObjectsController.php
+++ b/library/Director/Web/Controller/ObjectsController.php
@@ -90,13 +90,12 @@ abstract class ObjectsController extends ActionController
             $addTitle = $this->translate('Add %s');
         }
 
-        $this->view->addLink = $this->view->icon('plus')
-            . ' '
-            . $this->view->qlink(
-                sprintf($addTitle, $this->translate(ucfirst($ltype))),
-                'director/' . $ltype .'/add',
-                $addParams
-            );
+        $this->view->addLink = $this->view->qlink(
+            sprintf($addTitle, $this->translate(ucfirst($ltype))),
+            'director/' . $ltype .'/add',
+            $addParams,
+            array('class' => 'icon-plus')
+        );
 
         $this->view->title = $this->translate('Icinga ' . ucfirst($ltype));
         $table = $this->loadTable($table)->setConnection($this->db());



More information about the icinga-checkins mailing list