diff --git a/application/controllers/GroupController.php b/application/controllers/GroupController.php index 45d677e50..f0addcd51 100644 --- a/application/controllers/GroupController.php +++ b/application/controllers/GroupController.php @@ -96,6 +96,28 @@ class GroupController extends Controller ); } + /** + * Show a group + */ + public function showAction() + { + $groupName = $this->params->getRequired('group'); + $backend = $this->getUserGroupBackend($this->params->getRequired('backend')); + + $group = $backend->select(array( + 'group_name', + 'parent_name', + 'created_at', + 'last_modified' + ))->where('group_name', $groupName)->fetchRow(); + if ($group === false) { + $this->httpNotFound(sprintf($this->translate('Group "%s" not found'), $groupName)); + } + + $this->view->group = $group; + $this->view->backend = $backend; + } + /** * Add a group */ @@ -125,6 +147,9 @@ class GroupController extends Controller } $form = new UserGroupForm(); + $form->setRedirectUrl( + Url::fromPath('group/show', array('backend' => $backend->getName(), 'group' => $groupName)) + ); $form->setRepository($backend); $form->edit($groupName, get_object_vars($row))->handleRequest(); diff --git a/application/views/scripts/group/list.phtml b/application/views/scripts/group/list.phtml index 05b79d5f7..be2dfae1a 100644 --- a/application/views/scripts/group/list.phtml +++ b/application/views/scripts/group/list.phtml @@ -44,7 +44,12 @@ if (count($groups) > 0): ?>
= $this->escape($group->group_name); ?>
= $editLink; ?> += $this->translate('Parent'); ?>: = $group->parent_name === null ? '-' : $this->qlink( + $group->parent_name, + 'group/show', + array( + 'backend' => $backend->getName(), + 'group' => $group->parent_name + ), + array( + 'title' => sprintf($this->translate('Show detailed information for group %s'), $group->parent_name) + ) + ); ?>
+= $this->translate('Created at'); ?>: = $group->created_at === null ? '-' : $this->formatDateTime($group->created_at); ?>
+= $this->translate('Last modified'); ?>: = $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?>
+