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/comment/create.php | 4 ++-- app/Template/comment/edit.php | 4 ++-- app/Template/comment/remove.php | 4 ++-- app/Template/comment/show.php | 17 +++++++++++++---- 4 files changed, 19 insertions(+), 10 deletions(-) (limited to 'app/Template/comment') diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index 4110711e..1bdbac49 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -2,7 +2,7 @@

-
+ formCsrf() ?> formHidden('task_id', $values) ?> formHidden('user_id', $values) ?> @@ -30,7 +30,7 @@ - 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/edit.php b/app/Template/comment/edit.php index 51c3ced8..b4126a3e 100644 --- a/app/Template/comment/edit.php +++ b/app/Template/comment/edit.php @@ -2,7 +2,7 @@

-
+ 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'] + ) + ) + ) ?> -- cgit v1.2.3