Added basic comments on tasks

This commit is contained in:
rzeka
2014-03-04 20:17:26 +01:00
parent 86bee36784
commit ccc54c65cf
8 changed files with 128 additions and 4 deletions

View File

@@ -60,5 +60,26 @@
</article>
<?php endif ?>
<h3><?= t('Comments') ?></h3>
<?php if ($comments): ?>
<ul id="comments">
<?php foreach ($comments as $comment): ?>
<li>
<p><?= $comment['username'] ?> @ <?= dt('%B %e, %G at %k:%M %p', $comment['date']) ?></p>
<?= Helper\markdown($comment['comment']) ?>
</li>
<?php endforeach ?>
</ul>
<?php else: ?>
<p><?= t('No comments') ?></p>
<?php endif ?>
<form method="post" action="?controller=task&amp;action=show&amp;task_id=<?= $task['id'] ?>" autocomplete="off">
<?= Helper\form_textarea('comment', $values, $errors) ?><br/>
<div class="form-actions">
<input type="submit" value="<?= t('Post comment') ?>" class="btn btn-blue"/>
</div>
</form>
</section>
</section>
</section>