From 44f680cf2f1463721eb5bdb7eda4d3b339e63ba9 Mon Sep 17 00:00:00 2001
From: Frederic Guillot
Date: Sat, 10 Sep 2016 22:37:57 -0400
Subject: Add ui to create new custom project roles and column restrictions
---
app/Template/column/index.php | 2 +
app/Template/column/remove.php | 2 +-
app/Template/column_move_restriction/create.php | 24 ++++++++++
app/Template/column_move_restriction/remove.php | 14 ++++++
app/Template/project/sidebar.php | 3 ++
app/Template/project_role/create.php | 18 ++++++++
app/Template/project_role/remove.php | 14 ++++++
app/Template/project_role/show.php | 58 +++++++++++++++++++++++++
8 files changed, 134 insertions(+), 1 deletion(-)
create mode 100644 app/Template/column_move_restriction/create.php
create mode 100644 app/Template/column_move_restriction/remove.php
create mode 100644 app/Template/project_role/create.php
create mode 100644 app/Template/project_role/remove.php
create mode 100644 app/Template/project_role/show.php
(limited to 'app/Template')
diff --git a/app/Template/column/index.php b/app/Template/column/index.php
index 66890ba5..8c96a350 100644
--- a/app/Template/column/index.php
+++ b/app/Template/column/index.php
@@ -41,9 +41,11 @@
-
+
= $this->url->link(t('Edit'), 'ColumnController', 'edit', array('project_id' => $project['id'], 'column_id' => $column['id']), false, 'popover') ?>
-
+
= $this->url->link(t('Remove'), 'ColumnController', 'confirm', array('project_id' => $project['id'], 'column_id' => $column['id']), false, 'popover') ?>
diff --git a/app/Template/column/remove.php b/app/Template/column/remove.php
index b231a9a7..dc0a4712 100644
--- a/app/Template/column/remove.php
+++ b/app/Template/column/remove.php
@@ -9,7 +9,7 @@
- = $this->url->link(t('Yes'), 'ColumnController', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id'], 'remove' => 'yes'), true, 'btn btn-red') ?>
+ = $this->url->link(t('Yes'), 'ColumnController', 'remove', array('project_id' => $project['id'], 'column_id' => $column['id']), true, 'btn btn-red') ?>
= t('or') ?> = $this->url->link(t('cancel'), 'ColumnController', 'index', array('project_id' => $project['id']), false, 'close-popover') ?>
diff --git a/app/Template/column_move_restriction/create.php b/app/Template/column_move_restriction/create.php
new file mode 100644
index 00000000..69a75ce0
--- /dev/null
+++ b/app/Template/column_move_restriction/create.php
@@ -0,0 +1,24 @@
+
diff --git a/app/Template/column_move_restriction/remove.php b/app/Template/column_move_restriction/remove.php
new file mode 100644
index 00000000..1985e167
--- /dev/null
+++ b/app/Template/column_move_restriction/remove.php
@@ -0,0 +1,14 @@
+
+
+
+
+ = t('Do you really want to remove this column restriction: "%s" to "%s"?', $restriction['src_column_title'], $restriction['dst_column_title']) ?>
+
+
+
+ = $this->url->link(t('Yes'), 'ColumnMoveRestrictionController', 'remove', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), true, 'btn btn-red') ?>
+ = t('or') ?> = $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
+
+
diff --git a/app/Template/project/sidebar.php b/app/Template/project/sidebar.php
index 3be0da48..6e7fff05 100644
--- a/app/Template/project/sidebar.php
+++ b/app/Template/project/sidebar.php
@@ -38,6 +38,9 @@
app->checkMenuSelection('ProjectPermissionController') ?>>
= $this->url->link(t('Permissions'), 'ProjectPermissionController', 'index', array('project_id' => $project['id'])) ?>
+ app->checkMenuSelection('ProjectRoleController') ?>>
+ = $this->url->link(t('Custom roles'), 'ProjectRoleController', 'show', array('project_id' => $project['id'])) ?>
+
app->checkMenuSelection('ActionController') ?>>
= $this->url->link(t('Automatic actions'), 'ActionController', 'index', array('project_id' => $project['id'])) ?>
diff --git a/app/Template/project_role/create.php b/app/Template/project_role/create.php
new file mode 100644
index 00000000..8eee8f70
--- /dev/null
+++ b/app/Template/project_role/create.php
@@ -0,0 +1,18 @@
+
diff --git a/app/Template/project_role/remove.php b/app/Template/project_role/remove.php
new file mode 100644
index 00000000..25875e3a
--- /dev/null
+++ b/app/Template/project_role/remove.php
@@ -0,0 +1,14 @@
+
+
+
+
+ = t('Do you really want to remove this custom role: "%s"? All people assigned to this role will become project member.', $role['role']) ?>
+
+
+
+ = $this->url->link(t('Yes'), 'ProjectRoleController', 'remove', array('project_id' => $project['id'], 'role_id' => $role['role_id']), true, 'btn btn-red') ?>
+ = t('or') ?> = $this->url->link(t('cancel'), 'ProjectRoleController', 'show', array('project_id' => $project['id']), false, 'close-popover') ?>
+
+
diff --git a/app/Template/project_role/show.php b/app/Template/project_role/show.php
new file mode 100644
index 00000000..2114a1c9
--- /dev/null
+++ b/app/Template/project_role/show.php
@@ -0,0 +1,58 @@
+
+
+
+ = t('There is no custom role for this project.') ?>
+
+
+
+
+
+
+
+
+ -
+
+ = $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('Remove this role'), 'ProjectRoleController', 'confirm', array('project_id' => $project['id'], 'role_id' => $role['role_id']), false, 'popover') ?>
+
+
+
+ |
+
+ = t('Actions') ?>
+ |
+
+
+
+ = t('There is no restriction for this role.') ?> |
+
+
+
+
+
+
+ = $this->text->e($restriction['src_column_title']) ?>
+
+ = $this->text->e($restriction['dst_column_title']) ?>
+ |
+
+
+ = $this->url->link(t('Remove'), 'ColumnMoveRestrictionController', 'confirm', array('project_id' => $project['id'], 'restriction_id' => $restriction['restriction_id']), false, 'popover') ?>
+ |
+
+
+
+
+
+
--
cgit v1.2.3