Fix broken links (Markdown content) for public boards (#319)
This commit is contained in:
@@ -21,7 +21,20 @@
|
||||
<?php endif ?>
|
||||
|
||||
<div class="markdown">
|
||||
<?= Helper\markdown($comment['comment']) ?>
|
||||
<?php if (isset($is_public) && $is_public): ?>
|
||||
<?= Helper\markdown(
|
||||
$comment['comment'],
|
||||
array(
|
||||
'controller' => 'task',
|
||||
'action' => 'readonly',
|
||||
'params' => array(
|
||||
'token' => $project['token']
|
||||
)
|
||||
)
|
||||
) ?>
|
||||
<?php else: ?>
|
||||
<?= Helper\markdown($comment['comment']) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
<?= Helper\template('comment_show', array(
|
||||
'comment' => $comment,
|
||||
'task' => $task,
|
||||
'project' => $project,
|
||||
'not_editable' => isset($not_editable) && $not_editable,
|
||||
'is_public' => isset($is_public) && $is_public,
|
||||
)) ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
|
||||
@@ -4,10 +4,24 @@
|
||||
|
||||
<p class="pull-right"><?= Helper\a(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
|
||||
|
||||
<?= Helper\template('task_show_description', array('task' => $task)) ?>
|
||||
<?= Helper\template('task_show_description', array(
|
||||
'task' => $task,
|
||||
'project' => $project,
|
||||
'is_public' => true
|
||||
)) ?>
|
||||
|
||||
<?= Helper\template('subtask_show', array('task' => $task, 'subtasks' => $subtasks, 'not_editable' => true)) ?>
|
||||
<?= Helper\template('subtask_show', array(
|
||||
'task' => $task,
|
||||
'subtasks' => $subtasks,
|
||||
'not_editable' => true
|
||||
)) ?>
|
||||
|
||||
<?= Helper\template('task_comments', array('task' => $task, 'comments' => $comments, 'not_editable' => true)) ?>
|
||||
<?= Helper\template('task_comments', array(
|
||||
'task' => $task,
|
||||
'comments' => $comments,
|
||||
'project' => $project,
|
||||
'not_editable' => true,
|
||||
'is_public' => true,
|
||||
)) ?>
|
||||
|
||||
</section>
|
||||
@@ -4,4 +4,4 @@
|
||||
<?= Helper\template('subtask_show', array('task' => $task, 'subtasks' => $subtasks)) ?>
|
||||
<?= Helper\template('task_timesheet', array('timesheet' => $timesheet)) ?>
|
||||
<?= Helper\template('file_show', array('task' => $task, 'files' => $files)) ?>
|
||||
<?= Helper\template('task_comments', array('task' => $task, 'comments' => $comments)) ?>
|
||||
<?= Helper\template('task_comments', array('task' => $task, 'comments' => $comments, 'project' => $project)) ?>
|
||||
@@ -5,7 +5,20 @@
|
||||
</div>
|
||||
|
||||
<article class="markdown task-show-description">
|
||||
<?= Helper\markdown($task['description']) ?: t('There is no description.') ?>
|
||||
<?php if (! isset($is_public)): ?>
|
||||
<?= Helper\markdown($task['description']) ?>
|
||||
<?php else: ?>
|
||||
<?= Helper\markdown(
|
||||
$task['description'],
|
||||
array(
|
||||
'controller' => 'task',
|
||||
'action' => 'readonly',
|
||||
'params' => array(
|
||||
'token' => $project['token']
|
||||
)
|
||||
)
|
||||
) ?>
|
||||
<?php endif ?>
|
||||
</article>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
Reference in New Issue
Block a user