From 772804add8095eea9b3ec2a832c2f82fbb9a6fd5 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 31 Dec 2014 12:37:15 -0500 Subject: Acl refactoring --- app/Template/app/dashboard.php | 4 +-- app/Template/app/projects.php | 2 +- app/Template/board/assignee.php | 2 +- app/Template/board/category.php | 2 +- app/Template/board/filters.php | 2 +- app/Template/board/subtasks.php | 2 +- app/Template/board/task.php | 20 +++++++------- app/Template/comment/create.php | 4 +-- app/Template/comment/edit.php | 4 +-- app/Template/comment/remove.php | 4 +-- app/Template/comment/show.php | 17 +++++++++--- app/Template/file/new.php | 4 +-- app/Template/file/open.php | 2 +- app/Template/file/remove.php | 4 +-- app/Template/file/show.php | 6 ++--- app/Template/layout.php | 2 +- app/Template/project/index.php | 2 +- app/Template/project/layout.php | 2 +- app/Template/project/sidebar.php | 48 ++++++++++++++++----------------- app/Template/project/users.php | 8 +++--- app/Template/subtask/create.php | 4 +-- app/Template/subtask/edit.php | 4 +-- app/Template/subtask/remove.php | 2 +- app/Template/subtask/show.php | 4 +-- app/Template/task/close.php | 4 +-- app/Template/task/comments.php | 2 +- app/Template/task/duplicate.php | 4 +-- app/Template/task/duplicate_project.php | 2 +- app/Template/task/edit.php | 4 +-- app/Template/task/edit_description.php | 4 +-- app/Template/task/move_project.php | 2 +- app/Template/task/open.php | 4 +-- app/Template/task/remove.php | 4 +-- app/Template/task/show.php | 2 +- app/Template/task/show_description.php | 11 +++++++- app/Template/task/sidebar.php | 18 ++++++------- app/Template/task/table.php | 4 +-- app/Template/task/time.php | 2 +- app/Template/user/edit.php | 2 +- app/Template/user/external.php | 4 +-- app/Template/user/index.php | 2 +- app/Template/user/layout.php | 2 +- app/Template/user/sidebar.php | 4 +-- 43 files changed, 125 insertions(+), 111 deletions(-) (limited to 'app/Template') diff --git a/app/Template/app/dashboard.php b/app/Template/app/dashboard.php index 5064967b..81305ed8 100644 --- a/app/Template/app/dashboard.php +++ b/app/Template/app/dashboard.php @@ -1,12 +1,12 @@
-
+ formCsrf() ?> formHidden('id', $values) ?> @@ -30,6 +30,6 @@
- a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php index 374d2c37..2338a03d 100644 --- a/app/Template/comment/remove.php +++ b/app/Template/comment/remove.php @@ -10,8 +10,8 @@ render('comment/show', array('comment' => $comment, 'task' => $task, 'preview' => true)) ?>
- a(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> + a(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> - a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
\ No newline at end of file diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index 2631975a..2cf9708b 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -9,12 +9,12 @@ @@ -33,7 +33,16 @@ ) ) ?> - markdown($comment['comment']) ?> + markdown( + $comment['comment'], + array( + 'controller' => 'task', + 'action' => 'show', + 'params' => array( + 'project_id' => $project['id'] + ) + ) + ) ?> diff --git a/app/Template/file/new.php b/app/Template/file/new.php index 861344b4..4f0c233b 100644 --- a/app/Template/file/new.php +++ b/app/Template/file/new.php @@ -2,13 +2,13 @@

-
+ formCsrf() ?>
formatBytes($max_size) : $max_size ?>
- a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
\ No newline at end of file diff --git a/app/Template/file/open.php b/app/Template/file/open.php index 9efd7780..70e0f8aa 100644 --- a/app/Template/file/open.php +++ b/app/Template/file/open.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/app/Template/file/remove.php b/app/Template/file/remove.php index 3e542c05..04ec30d5 100644 --- a/app/Template/file/remove.php +++ b/app/Template/file/remove.php @@ -8,8 +8,8 @@

- a(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> + a(t('Yes'), 'file', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'file_id' => $file['id']), true, 'btn btn-red') ?> - a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + a(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
\ No newline at end of file diff --git a/app/Template/file/show.php b/app/Template/file/show.php index 4742db87..179f5744 100644 --- a/app/Template/file/show.php +++ b/app/Template/file/show.php @@ -8,12 +8,12 @@ diff --git a/app/Template/project/index.php b/app/Template/project/index.php index 4f07a83a..58c520d1 100644 --- a/app/Template/project/index.php +++ b/app/Template/project/index.php @@ -1,7 +1,7 @@