diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-09-18 21:19:48 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-09-18 21:19:48 -0400 |
commit | 3043163747b13ce1942b2e55977cf7c5417021de (patch) | |
tree | 31552d8bfdf3b7a6eedfaded116b863e980f86b4 /app/Template/project_role | |
parent | 4bc83646b0b15bff9ae55083121f66b7a89e433d (diff) |
Add column restrictions to custom project roles
Diffstat (limited to 'app/Template/project_role')
-rw-r--r-- | app/Template/project_role/show.php | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/app/Template/project_role/show.php b/app/Template/project_role/show.php index 81281a3e..59200fc9 100644 --- a/app/Template/project_role/show.php +++ b/app/Template/project_role/show.php @@ -24,7 +24,11 @@ </li> <li> <i class="fa fa-plus fa-fw" aria-hidden="true"></i> - <?= $this->url->link(t('Add a new column restriction'), 'ColumnMoveRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> + <?= $this->url->link(t('Add a new drag and drop restriction'), 'ColumnMoveRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> + </li> + <li> + <i class="fa fa-plus fa-fw" aria-hidden="true"></i> + <?= $this->url->link(t('Add a new column restriction'), 'ColumnRestrictionController', 'create', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?> </li> <li> <i class="fa fa-pencil fa-fw" aria-hidden="true"></i> @@ -41,7 +45,7 @@ <?= t('Actions') ?> </th> </tr> - <?php if (empty($role['project_restrictions']) && empty($role['column_restrictions'])): ?> + <?php if (empty($role['project_restrictions']) && empty($role['column_restrictions']) && empty($role['column_move_restrictions'])): ?> <tr> <td colspan="2"><?= t('There is no restriction for this role.') ?></td> </tr> @@ -49,6 +53,9 @@ <?php foreach ($role['project_restrictions'] as $restriction): ?> <tr> <td> + <i class="fa fa-ban fa-fw" aria-hidden="true"></i> + <strong><?= t('Project') ?></strong> + <i class="fa fa-arrow-right fa-fw" aria-hidden="true"></i> <?= $this->text->e($restriction['title']) ?> </td> <td> @@ -60,7 +67,28 @@ <?php foreach ($role['column_restrictions'] as $restriction): ?> <tr> <td> - <?= t('Only moving task from the column "%s" to "%s" is permitted', $restriction['src_column_title'], $restriction['dst_column_title']) ?> + <?php if (strpos($restriction['rule'], 'block') === 0): ?> + <i class="fa fa-ban fa-fw" aria-hidden="true"></i> + <?php else: ?> + <i class="fa fa-check-circle-o fa-fw" aria-hidden="true"></i> + <?php endif ?> + <strong><?= $this->text->e($restriction['column_title']) ?></strong> + <i class="fa fa-arrow-right fa-fw" aria-hidden="true"></i> + <?= $this->text->e($restriction['title']) ?> + </td> + <td> + <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> + <?= $this->url->link(t('Remove'), 'ColumnRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?> + </td> + </tr> + <?php endforeach ?> + <?php foreach ($role['column_move_restrictions'] as $restriction): ?> + <tr> + <td> + <i class="fa fa-check-circle-o fa-fw" aria-hidden="true"></i> + <strong><?= $this->text->e($restriction['src_column_title']) ?> / <?= $this->text->e($restriction['dst_column_title']) ?></strong> + <i class="fa fa-arrow-right fa-fw" aria-hidden="true"></i> + <?= t('Only moving task between those columns is permitted') ?> </td> <td> <i class="fa fa-trash-o fa-fw" aria-hidden="true"></i> |