1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00
kanboard_ynh/sources/app/Template/comment/show.php

57 lines
2.3 KiB
PHP
Raw Normal View History

2014-07-20 12:26:15 +02:00
<div class="comment <?= isset($preview) ? 'comment-preview' : '' ?>" id="comment-<?= $comment['id'] ?>">
<p class="comment-title">
2015-04-21 17:56:16 +02:00
<?php if (! empty($comment['email'])): ?>
2015-08-16 17:04:56 +02:00
<?= $this->user->avatar($comment['email'], $comment['name'] ?: $comment['username']) ?>
2015-04-21 17:56:16 +02:00
<?php endif ?>
2015-08-16 17:04:56 +02:00
<?php if (! empty($comment['username'])): ?>
<span class="comment-username"><?= $this->e($comment['name'] ?: $comment['username']) ?></span> @
<?php endif ?>
<span class="comment-date"><?= dt('%B %e, %Y at %k:%M %p', $comment['date_creation']) ?></span>
2014-07-20 12:26:15 +02:00
</p>
<div class="comment-inner">
<?php if (! isset($preview)): ?>
<ul class="comment-actions">
<li><a href="#comment-<?= $comment['id'] ?>"><?= t('link') ?></a></li>
2015-08-16 17:04:56 +02:00
<?php if ((! isset($not_editable) || ! $not_editable) && ($this->user->isAdmin() || $this->user->isCurrentUser($comment['user_id']))): ?>
2014-07-20 12:26:15 +02:00
<li>
2015-08-16 17:04:56 +02:00
<?= $this->url->link(t('remove'), 'comment', 'confirm', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
2014-07-20 12:26:15 +02:00
</li>
<li>
2015-08-16 17:04:56 +02:00
<?= $this->url->link(t('edit'), 'comment', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'comment_id' => $comment['id'])) ?>
2014-07-20 12:26:15 +02:00
</li>
<?php endif ?>
</ul>
<?php endif ?>
<div class="markdown">
2014-11-23 20:13:38 +01:00
<?php if (isset($is_public) && $is_public): ?>
2015-08-16 17:04:56 +02:00
<?= $this->text->markdown(
2014-11-23 20:13:38 +01:00
$comment['comment'],
array(
'controller' => 'task',
'action' => 'readonly',
'params' => array(
'token' => $project['token']
)
)
) ?>
<?php else: ?>
2015-08-16 17:04:56 +02:00
<?= $this->text->markdown(
2015-01-16 14:23:05 +01:00
$comment['comment'],
array(
'controller' => 'task',
'action' => 'show',
'params' => array(
'project_id' => $task['project_id']
)
)
) ?>
2014-11-23 20:13:38 +01:00
<?php endif ?>
2014-07-20 12:26:15 +02:00
</div>
</div>
</div>