diff options
Diffstat (limited to 'app/Template/comment')
-rw-r--r-- | app/Template/comment/create.php | 6 | ||||
-rw-r--r-- | app/Template/comment/edit.php | 4 | ||||
-rw-r--r-- | app/Template/comment/remove.php | 6 | ||||
-rw-r--r-- | app/Template/comment/show.php | 28 |
4 files changed, 11 insertions, 33 deletions
diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index b6c27ae0..0358107a 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -1,7 +1,7 @@ <div class="page-header"> <h2><?= t('Add a comment') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('comment', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> +<form class="popover-form" method="post" action="<?= $this->url->href('CommentController', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('task_id', $values) ?> <?= $this->form->hidden('user_id', $values) ?> @@ -15,7 +15,7 @@ 'autofocus', 'required', 'placeholder="'.t('Leave a comment').'"', - 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"', + 'data-mention-search-url="'.$this->url->href('UserAjaxController', 'mention', array('project_id' => $task['project_id'])).'"', ), 'markdown-editor' ) ?> @@ -24,6 +24,6 @@ <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> </form> diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php index 4036b673..f69fc0c1 100644 --- a/app/Template/comment/edit.php +++ b/app/Template/comment/edit.php @@ -2,7 +2,7 @@ <h2><?= t('Edit a comment') ?></h2> </div> -<form class="popover-form" method="post" action="<?= $this->url->href('comment', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off"> +<form class="popover-form" method="post" action="<?= $this->url->href('CommentController', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off"> <?= $this->form->csrf() ?> <?= $this->form->hidden('id', $values) ?> @@ -22,6 +22,6 @@ <div class="form-actions"> <button type="submit" class="btn btn-blue"><?= t('Save') ?></button> <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> </form> diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php index 3174df02..55587b67 100644 --- a/app/Template/comment/remove.php +++ b/app/Template/comment/remove.php @@ -14,8 +14,8 @@ )) ?> <div class="form-actions"> - <?= $this->url->link(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> + <?= $this->url->link(t('Yes'), 'CommentController', 'remove', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> <?= t('or') ?> - <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> + <?= $this->url->link(t('cancel'), 'TaskViewController', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index 3f45e2e7..8419a14e 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -12,29 +12,7 @@ <div class="comment-content"> <div class="markdown"> - <?php if (isset($is_public) && $is_public): ?> - <?= $this->text->markdown( - $comment['comment'], - array( - 'controller' => 'task', - 'action' => 'readonly', - 'params' => array( - 'token' => $project['token'] - ) - ) - ) ?> - <?php else: ?> - <?= $this->text->markdown( - $comment['comment'], - array( - 'controller' => 'task', - 'action' => 'show', - 'params' => array( - 'project_id' => $task['project_id'] - ) - ) - ) ?> - <?php endif ?> + <?= $this->text->markdown($comment['comment'], isset($is_public) && $is_public) ?> </div> </div> @@ -48,11 +26,11 @@ <?php if ($editable && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?> <li> <i class="fa fa-remove fa-fw"></i> - <?= $this->url->link(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> + <?= $this->url->link(t('remove'), 'CommentController', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> </li> <li> <i class="fa fa-edit fa-fw"></i> - <?= $this->url->link(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> + <?= $this->url->link(t('edit'), 'CommentController', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id']), false, 'popover') ?> </li> <?php endif ?> </ul> |