[icinga-checkins] icinga.org: icingaweb2/bugfix/make-edit-user-control-more-prominent-10442: Make edit user button more prominent

git at icinga.org git at icinga.org
Thu Feb 18 13:09:33 CET 2016


Module: icingaweb2
Branch: bugfix/make-edit-user-control-more-prominent-10442
Commit: 923cd1087f7f707d7d18baeb21ad3b4eb8d00ea1
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=923cd1087f7f707d7d18baeb21ad3b4eb8d00ea1

Author: Alexander A. Klimov <alexander.klimov at netways.de>
Date:   Thu Feb 18 13:07:36 2016 +0100

Make edit user button more prominent

refs #10442

---

 application/views/scripts/user/show.phtml |   35 ++++++++++++++---------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/application/views/scripts/user/show.phtml b/application/views/scripts/user/show.phtml
index 5aabdd1..ddcbd35 100644
--- a/application/views/scripts/user/show.phtml
+++ b/application/views/scripts/user/show.phtml
@@ -4,29 +4,28 @@ use Icinga\Data\Updatable;
 use Icinga\Data\Reducible;
 use Icinga\Data\Selectable;
 
-$editLink = null;
-if ($this->hasPermission('config/authentication/users/edit') && $backend instanceof Updatable) {
-    $editLink = $this->qlink(
-        null,
-        'user/edit',
-        array(
-            'backend'   => $backend->getName(),
-            'user'      => $user->user_name
-        ),
-        array(
-            'title' => sprintf($this->translate('Edit user %s'), $user->user_name),
-            'class' => 'user-edit',
-            'icon'  => 'edit'
-        )
-    );
-}
-
 ?>
 <div class="controls separated">
 <?php if (! $this->compact): ?>
     <?= $tabs; ?>
 <?php endif ?>
-    <h2 class="clearfix"><?= $this->escape($user->user_name) ?><span class="pull-right"><?= $editLink ?></span></h2>
+    <h2><?= $this->escape($user->user_name) ?></h2>
+    <?php
+    if ($this->hasPermission('config/authentication/users/edit') && $backend instanceof Updatable) {
+        echo $this->qlink(
+            $this->translate('Edit User'),
+            'user/edit',
+            array(
+                'backend'   => $backend->getName(),
+                'user'      => $user->user_name
+            ),
+            array(
+                'class' => 'button-link',
+                'icon'  => 'edit'
+            )
+        );
+    }
+    ?>
     <table class="name-value-table">
         <tr>
             <th><?= $this->translate('State'); ?></th>



More information about the icinga-checkins mailing list