summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/group/associate.php41
-rw-r--r--app/Template/group/create.php19
-rw-r--r--app/Template/group/dissociate.php25
-rw-r--r--app/Template/group/edit.php22
-rw-r--r--app/Template/group/index.php12
-rw-r--r--app/Template/group/remove.php25
-rw-r--r--app/Template/group/users.php7
-rw-r--r--app/Template/group_creation/show.php15
-rw-r--r--app/Template/group_modification/show.php18
-rw-r--r--app/Template/header.php2
-rw-r--r--app/Template/project_permission/index.php2
-rw-r--r--app/Template/user/index.php2
-rw-r--r--app/Template/user/layout.php2
13 files changed, 85 insertions, 107 deletions
diff --git a/app/Template/group/associate.php b/app/Template/group/associate.php
index 9de46f35..87787568 100644
--- a/app/Template/group/associate.php
+++ b/app/Template/group/associate.php
@@ -1,25 +1,20 @@
-<section id="main">
- <div class="page-header">
- <ul>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
- <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('View group members'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
- </ul>
- </div>
- <?php if (empty($users)): ?>
- <p class="alert"><?= t('There is no user available.') ?></p>
- <?php else: ?>
- <form method="post" action="<?= $this->url->href('group', 'addUser', array('group_id' => $group['id'])) ?>" autocomplete="off">
- <?= $this->form->csrf() ?>
- <?= $this->form->hidden('group_id', $values) ?>
+<div class="page-header">
+ <h2><?= t('Add group member to "%s"', $group['name']) ?></h2>
+</div>
+<?php if (empty($users)): ?>
+ <p class="alert"><?= t('There is no user available.') ?></p>
+<?php else: ?>
+ <form class="popover-form" method="post" action="<?= $this->url->href('GroupListController', 'addUser', array('group_id' => $group['id'])) ?>" autocomplete="off">
+ <?= $this->form->csrf() ?>
+ <?= $this->form->hidden('group_id', $values) ?>
- <?= $this->form->label(t('User'), 'user_id') ?>
- <?= $this->form->select('user_id', $users, $values, $errors, array('required'), 'chosen-select') ?>
+ <?= $this->form->label(t('User'), 'user_id') ?>
+ <?= $this->form->select('user_id', $users, $values, $errors, array('required'), 'chosen-select') ?>
- <div class="form-actions">
- <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'group', 'index') ?>
- </div>
- </form>
- <?php endif ?>
-</section>
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?>
+ </div>
+ </form>
+<?php endif ?>
diff --git a/app/Template/group/create.php b/app/Template/group/create.php
deleted file mode 100644
index 4ce6b1f3..00000000
--- a/app/Template/group/create.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<section id="main">
- <div class="page-header">
- <ul>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
- </ul>
- </div>
- <form method="post" action="<?= $this->url->href('group', 'save') ?>" autocomplete="off">
- <?= $this->form->csrf() ?>
-
- <?= $this->form->label(t('Name'), 'name') ?>
- <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?>
-
- <div class="form-actions">
- <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'group', 'index') ?>
- </div>
- </form>
-</section>
diff --git a/app/Template/group/dissociate.php b/app/Template/group/dissociate.php
index e1c60764..50ef6d61 100644
--- a/app/Template/group/dissociate.php
+++ b/app/Template/group/dissociate.php
@@ -1,17 +1,12 @@
-<section id="main">
- <div class="page-header">
- <ul>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
- <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('View group members'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
- </ul>
- </div>
- <div class="confirm">
- <p class="alert alert-info"><?= t('Do you really want to remove the user "%s" from the group "%s"?', $user['name'] ?: $user['username'], $group['name']) ?></p>
+<div class="page-header">
+ <h2><?= t('Remove user from group "%s"', $group['name']) ?></h2>
+</div>
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove the user "%s" from the group "%s"?', $user['name'] ?: $user['username'], $group['name']) ?></p>
- <div class="form-actions">
- <?= $this->url->link(t('Yes'), 'group', 'removeUser', array('group_id' => $group['id'], 'user_id' => $user['id']), true, 'btn btn-red') ?>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'group', 'users', array('group_id' => $group['id'])) ?>
- </div>
+ <div class="form-actions">
+ <?= $this->url->link(t('Yes'), 'GroupListController', 'removeUser', array('group_id' => $group['id'], 'user_id' => $user['id']), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'GroupListController', 'users', array('group_id' => $group['id']), false, 'close-popover') ?>
</div>
-</section>
+</div>
diff --git a/app/Template/group/edit.php b/app/Template/group/edit.php
deleted file mode 100644
index e9d9dd5a..00000000
--- a/app/Template/group/edit.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<section id="main">
- <div class="page-header">
- <ul>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
- </ul>
- </div>
- <form method="post" action="<?= $this->url->href('group', 'update') ?>" autocomplete="off">
- <?= $this->form->csrf() ?>
-
- <?= $this->form->hidden('id', $values) ?>
- <?= $this->form->hidden('external_id', $values) ?>
-
- <?= $this->form->label(t('Name'), 'name') ?>
- <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?>
-
- <div class="form-actions">
- <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'group', 'index') ?>
- </div>
- </form>
-</section>
diff --git a/app/Template/group/index.php b/app/Template/group/index.php
index 8302e5a8..74e074c3 100644
--- a/app/Template/group/index.php
+++ b/app/Template/group/index.php
@@ -2,7 +2,7 @@
<div class="page-header">
<ul>
<li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
- <li><i class="fa fa-user-plus fa-fw"></i><?= $this->url->link(t('New group'), 'group', 'create') ?></li>
+ <li><i class="fa fa-user-plus fa-fw"></i><?= $this->url->link(t('New group'), 'GroupCreationController', 'show', array(), false, 'popover') ?></li>
</ul>
</div>
<?php if ($paginator->isEmpty()): ?>
@@ -24,16 +24,16 @@
<?= $this->text->e($group['external_id']) ?>
</td>
<td>
- <?= $this->text->e($group['name']) ?>
+ <?= $this->url->link($this->text->e($group['name']), 'GroupListController', 'users', array('group_id' => $group['id'])) ?>
</td>
<td>
<div class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
- <li><?= $this->url->link(t('Add group member'), 'group', 'associate', array('group_id' => $group['id'])) ?></li>
- <li><?= $this->url->link(t('Members'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
- <li><?= $this->url->link(t('Edit'), 'group', 'edit', array('group_id' => $group['id'])) ?></li>
- <li><?= $this->url->link(t('Remove'), 'group', 'confirm', array('group_id' => $group['id'])) ?></li>
+ <li><?= $this->url->link(t('Add group member'), 'GroupListController', 'associate', array('group_id' => $group['id']), false, 'popover') ?></li>
+ <li><?= $this->url->link(t('Members'), 'GroupListController', 'users', array('group_id' => $group['id'])) ?></li>
+ <li><?= $this->url->link(t('Edit'), 'GroupModificationController', 'show', array('group_id' => $group['id']), false, 'popover') ?></li>
+ <li><?= $this->url->link(t('Remove'), 'GroupListController', 'confirm', array('group_id' => $group['id']), false, 'popover') ?></li>
</ul>
</div>
</td>
diff --git a/app/Template/group/remove.php b/app/Template/group/remove.php
index 1cb007b1..408b3d83 100644
--- a/app/Template/group/remove.php
+++ b/app/Template/group/remove.php
@@ -1,17 +1,12 @@
-<section id="main">
- <div class="page-header">
- <ul>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
- <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('View group members'), 'group', 'users', array('group_id' => $group['id'])) ?></li>
- </ul>
- </div>
- <div class="confirm">
- <p class="alert alert-info"><?= t('Do you really want to remove this group: "%s"?', $group['name']) ?></p>
+<div class="page-header">
+ <h2><?= t('Remove group') ?></h2>
+</div>
+<div class="confirm">
+ <p class="alert alert-info"><?= t('Do you really want to remove this group: "%s"?', $group['name']) ?></p>
- <div class="form-actions">
- <?= $this->url->link(t('Yes'), 'group', 'remove', array('group_id' => $group['id']), true, 'btn btn-red') ?>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'group', 'index') ?>
- </div>
+ <div class="form-actions">
+ <?= $this->url->link(t('Yes'), 'GroupListController', 'remove', array('group_id' => $group['id']), true, 'btn btn-red') ?>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?>
</div>
-</section>
+</div>
diff --git a/app/Template/group/users.php b/app/Template/group/users.php
index bbd41525..0f802146 100644
--- a/app/Template/group/users.php
+++ b/app/Template/group/users.php
@@ -1,8 +1,8 @@
<section id="main">
<div class="page-header">
<ul>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
- <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('Add group member'), 'group', 'associate', array('group_id' => $group['id'])) ?></li>
+ <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'GroupListController', 'index') ?></li>
+ <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('Add group member'), 'GroupListController', 'associate', array('group_id' => $group['id']), false, 'popover') ?></li>
</ul>
</div>
<?php if ($paginator->isEmpty()): ?>
@@ -31,7 +31,8 @@
<a href="mailto:<?= $this->text->e($user['email']) ?>"><?= $this->text->e($user['email']) ?></a>
</td>
<td>
- <?= $this->url->link(t('Remove this user'), 'group', 'dissociate', array('group_id' => $group['id'], 'user_id' => $user['id'])) ?>
+ <i class="fa fa-times fa-fw" aria-hidden="true"></i>
+ <?= $this->url->link(t('Remove this user'), 'GroupListController', 'dissociate', array('group_id' => $group['id'], 'user_id' => $user['id']), false, 'popover') ?>
</td>
</tr>
<?php endforeach ?>
diff --git a/app/Template/group_creation/show.php b/app/Template/group_creation/show.php
new file mode 100644
index 00000000..b219bd70
--- /dev/null
+++ b/app/Template/group_creation/show.php
@@ -0,0 +1,15 @@
+<div class="page-header">
+ <h2><?= t('New group') ?></h2>
+</div>
+<form class="popover-form" method="post" action="<?= $this->url->href('GroupCreationController', 'save') ?>" autocomplete="off">
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?>
+
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?>
+ </div>
+</form>
diff --git a/app/Template/group_modification/show.php b/app/Template/group_modification/show.php
new file mode 100644
index 00000000..ddf07369
--- /dev/null
+++ b/app/Template/group_modification/show.php
@@ -0,0 +1,18 @@
+<div class="page-header">
+ <h2><?= t('Edit group') ?></h2>
+</div>
+<form class="popover-form" method="post" action="<?= $this->url->href('GroupModificationController', 'save') ?>" autocomplete="off">
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->hidden('id', $values) ?>
+ <?= $this->form->hidden('external_id', $values) ?>
+
+ <?= $this->form->label(t('Name'), 'name') ?>
+ <?= $this->form->text('name', $values, $errors, array('autofocus', 'required', 'maxlength="100"')) ?>
+
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'GroupListController', 'index', array(), false, 'close-popover') ?>
+ </div>
+</form>
diff --git a/app/Template/header.php b/app/Template/header.php
index f47b270f..bac026d3 100644
--- a/app/Template/header.php
+++ b/app/Template/header.php
@@ -80,7 +80,7 @@
</li>
<li>
<i class="fa fa-group fa-fw"></i>
- <?= $this->url->link(t('Groups management'), 'group', 'index') ?>
+ <?= $this->url->link(t('Groups management'), 'GroupListController', 'index') ?>
</li>
<li>
<i class="fa fa-cog fa-fw"></i>
diff --git a/app/Template/project_permission/index.php b/app/Template/project_permission/index.php
index a7d666a6..6d1fc15c 100644
--- a/app/Template/project_permission/index.php
+++ b/app/Template/project_permission/index.php
@@ -113,7 +113,7 @@
'title="'.t('Enter group name...').'"',
'data-dst-field="group_id"',
'data-dst-extra-field="external_id"',
- 'data-search-url="'.$this->url->href('GroupHelper', 'autocomplete').'"',
+ 'data-search-url="'.$this->url->href('GroupAjaxController', 'autocomplete').'"',
),
'autocomplete') ?>
diff --git a/app/Template/user/index.php b/app/Template/user/index.php
index b810373f..15923e84 100644
--- a/app/Template/user/index.php
+++ b/app/Template/user/index.php
@@ -5,7 +5,7 @@
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'UserCreationController', 'show', array(), false, 'popover') ?></li>
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'UserCreationController', 'show', array('remote' => 1), false, 'popover') ?></li>
<li><i class="fa fa-upload fa-fw"></i><?= $this->url->link(t('Import'), 'UserImportController', 'show', array(), false, 'popover') ?></li>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
+ <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'GroupListController', 'index') ?></li>
</ul>
<?php endif ?>
</div>
diff --git a/app/Template/user/layout.php b/app/Template/user/layout.php
index 47df2997..2c4bb7be 100644
--- a/app/Template/user/layout.php
+++ b/app/Template/user/layout.php
@@ -6,7 +6,7 @@
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'UserCreationController', 'show', array(), false, 'popover') ?></li>
<li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'UserCreationController', 'show', array('remote' => 1), false, 'popover') ?></li>
<li><i class="fa fa-upload fa-fw"></i><?= $this->url->link(t('Import'), 'UserImportController', 'show', array(), false, 'popover') ?></li>
- <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'group', 'index') ?></li>
+ <li><i class="fa fa-users fa-fw"></i><?= $this->url->link(t('View all groups'), 'GroupListController', 'index') ?></li>
</ul>
<?php endif ?>
</div>