diff options
Diffstat (limited to 'app/Template/comment')
-rw-r--r-- | app/Template/comment/create.php | 12 | ||||
-rw-r--r-- | app/Template/comment/edit.php | 12 | ||||
-rw-r--r-- | app/Template/comment/remove.php | 6 | ||||
-rw-r--r-- | app/Template/comment/show.php | 12 |
4 files changed, 21 insertions, 21 deletions
diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index d72fa627..4110711e 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -2,10 +2,10 @@ <h2><?= t('Add a comment') ?></h2> </div> -<form method="post" action="<?= Helper\u('comment', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off"> - <?= Helper\form_csrf() ?> - <?= Helper\form_hidden('task_id', $values) ?> - <?= Helper\form_hidden('user_id', $values) ?> +<form method="post" action="<?= $this->u('comment', 'save', array('task_id' => $task['id'])) ?>" autocomplete="off"> + <?= $this->formCsrf() ?> + <?= $this->formHidden('task_id', $values) ?> + <?= $this->formHidden('user_id', $values) ?> <div class="form-tabs"> <ul class="form-tabs-nav"> @@ -17,7 +17,7 @@ </li> </ul> <div class="write-area"> - <?= Helper\form_textarea('comment', $values, $errors, array(! isset($skip_cancel) ? 'autofocus' : '', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?> + <?= $this->formTextarea('comment', $values, $errors, array(! isset($skip_cancel) ? 'autofocus' : '', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?> </div> <div class="preview-area"> <div class="markdown"></div> @@ -30,7 +30,7 @@ <input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/> <?php if (! isset($skip_cancel)): ?> <?= t('or') ?> - <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> <?php endif ?> </div> </form> diff --git a/app/Template/comment/edit.php b/app/Template/comment/edit.php index 386dd9b1..51c3ced8 100644 --- a/app/Template/comment/edit.php +++ b/app/Template/comment/edit.php @@ -2,11 +2,11 @@ <h2><?= t('Edit a comment') ?></h2> </div> -<form method="post" action="<?= Helper\u('comment', 'update', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off"> +<form method="post" action="<?= $this->u('comment', 'update', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?>" autocomplete="off"> - <?= Helper\form_csrf() ?> - <?= Helper\form_hidden('id', $values) ?> - <?= Helper\form_hidden('task_id', $values) ?> + <?= $this->formCsrf() ?> + <?= $this->formHidden('id', $values) ?> + <?= $this->formHidden('task_id', $values) ?> <div class="form-tabs"> <ul class="form-tabs-nav"> @@ -18,7 +18,7 @@ </li> </ul> <div class="write-area"> - <?= Helper\form_textarea('comment', $values, $errors, array('autofocus', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?> + <?= $this->formTextarea('comment', $values, $errors, array('autofocus', 'required', 'placeholder="'.t('Leave a comment').'"'), 'comment-textarea') ?> </div> <div class="preview-area"> <div class="markdown"></div> @@ -30,6 +30,6 @@ <div class="form-actions"> <input type="submit" value="<?= t('Update') ?>" class="btn btn-blue"/> <?= t('or') ?> - <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> </div> </form> diff --git a/app/Template/comment/remove.php b/app/Template/comment/remove.php index 50382369..374d2c37 100644 --- a/app/Template/comment/remove.php +++ b/app/Template/comment/remove.php @@ -7,11 +7,11 @@ <?= t('Do you really want to remove this comment?') ?> </p> - <?= Helper\template('comment/show', array('comment' => $comment, 'task' => $task, 'preview' => true)) ?> + <?= $this->render('comment/show', array('comment' => $comment, 'task' => $task, 'preview' => true)) ?> <div class="form-actions"> - <?= Helper\a(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> + <?= $this->a(t('Yes'), 'comment', 'remove', array('task_id' => $task['id'], 'comment_id' => $comment['id']), true, 'btn btn-red') ?> <?= t('or') ?> - <?= Helper\a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> + <?= $this->a(t('cancel'), 'task', 'show', array('task_id' => $task['id'])) ?> </div> </div>
\ No newline at end of file diff --git a/app/Template/comment/show.php b/app/Template/comment/show.php index 5e1e9337..2631975a 100644 --- a/app/Template/comment/show.php +++ b/app/Template/comment/show.php @@ -1,7 +1,7 @@ <div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>"> <p class="comment-title"> - <span class="comment-username"><?= Helper\escape($comment['name'] ?: $comment['username']) ?></span> @ <span class="comment-date"><?= dt('%B %e, %Y at %k:%M %p', $comment['date']) ?></span> + <span class="comment-username"><?= $this->e($comment['name'] ?: $comment['username']) ?></span> @ <span class="comment-date"><?= dt('%B %e, %Y at %k:%M %p', $comment['date']) ?></span> </p> <div class="comment-inner"> @@ -9,12 +9,12 @@ <?php if (! isset($preview)): ?> <ul class="comment-actions"> <li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li> - <?php if ((! isset($not_editable) || ! $not_editable) && (Helper\is_admin() || Helper\is_current_user($comment['user_id']))): ?> + <?php if ((! isset($not_editable) || ! $not_editable) && ($this->acl->isAdminUser() || $this->acl->isCurrentUser($comment['user_id']))): ?> <li> - <?= Helper\a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?> + <?= $this->a(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?> </li> <li> - <?= Helper\a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?> + <?= $this->a(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'comment_id' => $comment['id'])) ?> </li> <?php endif ?> </ul> @@ -22,7 +22,7 @@ <div class="markdown"> <?php if (isset($is_public) && $is_public): ?> - <?= Helper\markdown( + <?= $this->markdown( $comment['comment'], array( 'controller' => 'task', @@ -33,7 +33,7 @@ ) ) ?> <?php else: ?> - <?= Helper\markdown($comment['comment']) ?> + <?= $this->markdown($comment['comment']) ?> <?php endif ?> </div> |