From 380c8743c0c4d3f734d4cee9d32bccf824d36fd4 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 1 Oct 2015 10:03:29 +0200 Subject: [PATCH] Add tab for create, update and remove user group refs #5543 --- application/controllers/GroupController.php | 12 +++----- .../views/scripts/config/resource.phtml | 2 +- .../scripts/config/userbackend/reorder.phtml | 2 +- application/views/scripts/group/list.phtml | 28 +++++++++++++------ application/views/scripts/group/show.phtml | 28 +++++++++++-------- .../views/scripts/navigation/index.phtml | 2 +- application/views/scripts/role/list.phtml | 2 +- .../views/scripts/usergroupbackend/list.phtml | 2 +- .../views/scripts/config/index.phtml | 4 +-- 9 files changed, 46 insertions(+), 36 deletions(-) diff --git a/application/controllers/GroupController.php b/application/controllers/GroupController.php index 05dc95fcb..4dd05fdef 100644 --- a/application/controllers/GroupController.php +++ b/application/controllers/GroupController.php @@ -156,8 +156,7 @@ class GroupController extends AuthBackendController $form->setRepository($backend); $form->add()->handleRequest(); - $this->view->form = $form; - $this->render('form'); + $this->renderForm($form, $this->translate('New User Group')); } /** @@ -181,8 +180,7 @@ class GroupController extends AuthBackendController $this->httpNotFound(sprintf($this->translate('Group "%s" not found'), $groupName)); } - $this->view->form = $form; - $this->render('form'); + $this->renderForm($form, $this->translate('Update User Group')); } /** @@ -204,8 +202,7 @@ class GroupController extends AuthBackendController $this->httpNotFound(sprintf($this->translate('Group "%s" not found'), $groupName)); } - $this->view->form = $form; - $this->render('form'); + $this->renderForm($form, $this->translate('Remove User Group')); } /** @@ -232,8 +229,7 @@ class GroupController extends AuthBackendController $this->httpNotFound(sprintf($this->translate('Group "%s" not found'), $groupName)); } - $this->view->form = $form; - $this->render('form'); + $this->renderForm($form, $this->translate('New User Group Member')); } /** diff --git a/application/views/scripts/config/resource.phtml b/application/views/scripts/config/resource.phtml index 9a1cfdd04..6a32cca67 100644 --- a/application/views/scripts/config/resource.phtml +++ b/application/views/scripts/config/resource.phtml @@ -3,7 +3,7 @@
qlink( - $this->translate('Create A New Resource') , + $this->translate('Create a New Resource') , 'config/createresource', null, array( diff --git a/application/views/scripts/config/userbackend/reorder.phtml b/application/views/scripts/config/userbackend/reorder.phtml index 2445083f9..a065b6005 100644 --- a/application/views/scripts/config/userbackend/reorder.phtml +++ b/application/views/scripts/config/userbackend/reorder.phtml @@ -3,7 +3,7 @@
qlink( - $this->translate('Create A New User Backend') , + $this->translate('Create a New User Backend') , 'config/createuserbackend', null, array( diff --git a/application/views/scripts/group/list.phtml b/application/views/scripts/group/list.phtml index 8c8a8a2a0..87bc0159e 100644 --- a/application/views/scripts/group/list.phtml +++ b/application/views/scripts/group/list.phtml @@ -25,12 +25,29 @@ if (! isset($backend)) { $extensible = $this->hasPermission('config/authentication/groups/add') && $backend instanceof Extensible; $reducible = $this->hasPermission('config/authentication/groups/remove') && $backend instanceof Reducible; } +?> + + qlink( + $this->translate('Add a New User Group') , + 'group/add', + array('backend' => $backend->getName()), + array( + 'class' => 'button-link', + 'data-base-target' => '_next', + 'icon' => 'plus', + 'title' => $this->translate('Create a new user') + ) + ) ?> + + + - +
@@ -72,11 +89,4 @@ foreach ($groups as $group): ?>

translate('No groups found matching the filter'); ?>

- -qlink($this->translate('Add a new group'), 'group/add', array('backend' => $backend->getName()), array( - 'icon' => 'plus', - 'data-base-target' => '_next', - 'class' => 'group-add' -)); ?> - - \ No newline at end of file + diff --git a/application/views/scripts/group/show.phtml b/application/views/scripts/group/show.phtml index a7c3abed7..9848b12da 100644 --- a/application/views/scripts/group/show.phtml +++ b/application/views/scripts/group/show.phtml @@ -1,4 +1,4 @@ -hasPermission('config/authentication/groups/edit') && $backend instan
+ + qlink( + $this->translate('Add User to Group') , + 'group/addmember', + null, + array( + 'class' => 'button-link', + 'data-base-target' => '_next', + 'icon' => 'plus', + 'title' => $this->translate('Add user to group') + ) + ) ?> + +

translate('No group member found matching the filter'); ?>

- - qlink($this->translate('Add a new member'), 'group/addmember', array( - 'backend' => $backend->getName(), - 'group' => $group->group_name - ), array( - 'icon' => 'plus', - 'data-base-target' => '_next', - 'class' => 'member-add' - )); ?> - -
\ No newline at end of file + diff --git a/application/views/scripts/navigation/index.phtml b/application/views/scripts/navigation/index.phtml index 7ef7320ee..49f89c442 100644 --- a/application/views/scripts/navigation/index.phtml +++ b/application/views/scripts/navigation/index.phtml @@ -9,7 +9,7 @@
qlink( - $this->translate('Create A New Navigation Item') , + $this->translate('Create a New Navigation Item') , 'navigation/add', null, array( diff --git a/application/views/scripts/role/list.phtml b/application/views/scripts/role/list.phtml index 8f643dc04..00b9c7579 100644 --- a/application/views/scripts/role/list.phtml +++ b/application/views/scripts/role/list.phtml @@ -3,7 +3,7 @@
qlink( - $this->translate('Create A New Role') , + $this->translate('Create a New Role') , 'role/add', null, array( diff --git a/application/views/scripts/usergroupbackend/list.phtml b/application/views/scripts/usergroupbackend/list.phtml index e24054f26..fd688d80d 100644 --- a/application/views/scripts/usergroupbackend/list.phtml +++ b/application/views/scripts/usergroupbackend/list.phtml @@ -3,7 +3,7 @@
qlink( - $this->translate('Create A New User Group Backend') , + $this->translate('Create a New User Group Backend') , 'usergroupbackend/create', null, array( diff --git a/modules/monitoring/application/views/scripts/config/index.phtml b/modules/monitoring/application/views/scripts/config/index.phtml index 2748864d0..80882b59f 100644 --- a/modules/monitoring/application/views/scripts/config/index.phtml +++ b/modules/monitoring/application/views/scripts/config/index.phtml @@ -6,7 +6,7 @@

translate('Monitoring Backends') ?>

qlink( - $this->translate('Create A New Monitoring Backend') , + $this->translate('Create a New Monitoring Backend') , 'monitoring/config/createbackend', null, array( @@ -61,7 +61,7 @@

translate('Command Transports') ?>

qlink( - $this->translate('Create A New Command Transport') , + $this->translate('Create a New Command Transport') , 'monitoring/config/createtransport', null, array(
translate('Group'); ?>