From 923cd1087f7f707d7d18baeb21ad3b4eb8d00ea1 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 18 Feb 2016 13:07:36 +0100 Subject: [PATCH 1/2] 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 5aabdd11a..ddcbd35c5 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' - ) - ); -} - ?>
compact): ?> -

escape($user->user_name) ?>

+

escape($user->user_name) ?>

+ 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' + ) + ); + } + ?> From 41e11d318344280a1ee097d57a54cd49b949f856 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 22 Feb 2016 11:35:07 +0100 Subject: [PATCH 2/2] Restore the edit user button's title refs #10442 --- application/views/scripts/user/show.phtml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/views/scripts/user/show.phtml b/application/views/scripts/user/show.phtml index ddcbd35c5..6b5303e79 100644 --- a/application/views/scripts/user/show.phtml +++ b/application/views/scripts/user/show.phtml @@ -21,7 +21,8 @@ use Icinga\Data\Selectable; ), array( 'class' => 'button-link', - 'icon' => 'edit' + 'icon' => 'edit', + 'title' => sprintf($this->translate('Edit user %s'), $user->user_name) ) ); }
translate('State'); ?>