Always display task accordion elements

This commit is contained in:
Frédéric Guillot
2019-02-19 14:50:16 -08:00
parent 23417da763
commit 2251066a3c

View File

@@ -7,12 +7,9 @@
'editable' => $this->user->hasProjectAccess('TaskModificationController', 'edit', $project['id']), 'editable' => $this->user->hasProjectAccess('TaskModificationController', 'edit', $project['id']),
)) ?> )) ?>
<?php if (!empty($task['description'])): ?>
<?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/description', array('task' => $task)) ?> <?= $this->render('task/description', array('task' => $task)) ?>
<?php endif ?>
<?php if(!empty($subtasks)): ?>
<?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('subtask/show', array( <?= $this->render('subtask/show', array(
'task' => $task, 'task' => $task,
@@ -20,9 +17,7 @@
'project' => $project, 'project' => $project,
'editable' => $this->user->hasProjectAccess('SubtaskController', 'edit', $project['id']), 'editable' => $this->user->hasProjectAccess('SubtaskController', 'edit', $project['id']),
)) ?> )) ?>
<?php endif ?>
<?php if (!empty($internal_links)): ?>
<?= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_internal_link/show', array( <?= $this->render('task_internal_link/show', array(
'task' => $task, 'task' => $task,
@@ -32,27 +27,21 @@
'editable' => $this->user->hasProjectAccess('TaskInternalLinkController', 'edit', $project['id']), 'editable' => $this->user->hasProjectAccess('TaskInternalLinkController', 'edit', $project['id']),
'is_public' => false, 'is_public' => false,
)) ?> )) ?>
<?php endif ?>
<?php if (!empty($external_links)): ?>
<?= $this->hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_external_link/show', array( <?= $this->render('task_external_link/show', array(
'task' => $task, 'task' => $task,
'links' => $external_links, 'links' => $external_links,
'project' => $project, 'project' => $project,
)) ?> )) ?>
<?php endif ?>
<?php if (!empty($files) || !empty($images)): ?>
<?= $this->hook->render('template:task:show:before-attachments', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-attachments', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_file/show', array( <?= $this->render('task_file/show', array(
'task' => $task, 'task' => $task,
'files' => $files, 'files' => $files,
'images' => $images 'images' => $images
)) ?> )) ?>
<?php endif ?>
<?php if (!empty($comments)): ?>
<?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_comments/show', array( <?= $this->render('task_comments/show', array(
'task' => $task, 'task' => $task,
@@ -60,6 +49,5 @@
'project' => $project, 'project' => $project,
'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']), 'editable' => $this->user->hasProjectAccess('CommentController', 'edit', $project['id']),
)) ?> )) ?>
<?php endif ?>
<?= $this->hook->render('template:task:show:bottom', array('task' => $task, 'project' => $project)) ?> <?= $this->hook->render('template:task:show:bottom', array('task' => $task, 'project' => $project)) ?>