Improve task summary sections

This commit is contained in:
Frederic Guillot
2016-03-18 21:00:14 -04:00
parent 68fba8fb64
commit 854457baf0
34 changed files with 355 additions and 396 deletions

View File

@@ -1,35 +0,0 @@
<?php if (! empty($comments)): ?>
<div id="comments" class="task-show-section">
<div class="page-header">
<h2>
<?= t('Comments') ?>
<span class="comment-sorting">
<i class="fa fa-sort"></i>
<?= $this->url->link(t('change sorting'), 'comment', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</span>
</h2>
</div>
<?php foreach ($comments as $comment): ?>
<?= $this->render('comment/show', array(
'comment' => $comment,
'task' => $task,
'project' => $project,
'editable' => $editable,
'is_public' => isset($is_public) && $is_public,
)) ?>
<?php endforeach ?>
<?php if ($editable): ?>
<?= $this->render('comment/create', array(
'skip_cancel' => true,
'values' => array(
'user_id' => $this->user->getId(),
'task_id' => $task['id'],
),
'errors' => array(),
'task' => $task,
)) ?>
<?php endif ?>
</div>
<?php endif ?>

View File

@@ -1,16 +1,9 @@
<?php if (! empty($task['description'])): ?>
<div id="description" class="task-show-section">
<div class="page-header">
<h2><?= t('Description') ?></h2>
<ul>
<li>
<i class="fa fa-edit fa-fw"></i>
<?= $this->url->link(t('Edit the description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
</ul>
</div>
<article class="markdown task-show-description">
<section class="accordion-section <?= empty($task['description']) ? 'accordion-collapsed' : '' ?>">
<div class="accordion-title">
<h3><a href="#" class="fa accordion-toggle"></a> <?= t('Description') ?></h3>
</div>
<div class="accordion-content">
<article class="markdown">
<?php if (! isset($is_public)): ?>
<?= $this->text->markdown(
$task['description'],
@@ -36,4 +29,4 @@
<?php endif ?>
</article>
</div>
<?php endif ?>
</section>

View File

@@ -32,6 +32,13 @@
<?= $this->url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?>
</li>
<?php endif ?>
<?php if ($project['is_public'] && !$editable): ?>
<li class="smaller">
<i class="fa fa-th fa-fw"></i>
<?= $this->url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?>
</li>
<?php endif ?>
<li class="smaller">
</ul>
</div>
<div class="task-summary-column">

View File

@@ -1,9 +1,6 @@
<section id="main" class="public-task">
<?= $this->render('task/details', array('task' => $task, 'project' => $project, 'editable' => false)) ?>
<p class="pull-right"><?= $this->url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?></p>
<?= $this->render('task/description', array(
'task' => $task,
'project' => $project,
@@ -24,12 +21,11 @@
'is_public' => true,
)) ?>
<?= $this->render('task/comments', array(
<?= $this->render('comments/show', array(
'task' => $task,
'comments' => $comments,
'project' => $project,
'editable' => false,
'is_public' => true,
)) ?>
</section>
</section>

View File

@@ -7,11 +7,9 @@
)) ?>
<?= $this->hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/description', array('task' => $task)) ?>
<?= $this->hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('subtask/show', array(
'task' => $task,
'subtasks' => $subtasks,
@@ -20,23 +18,24 @@
'editable' => true,
)) ?>
<?= $this->hook->render('template:task:show:before-tasklinks', array('task' => $task, 'project' => $project)) ?>
<?= $this->hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('tasklink/show', array(
'task' => $task,
'links' => $links,
'links' => $internal_links,
'project' => $project,
'link_label_list' => $link_label_list,
'editable' => true,
'is_public' => false,
)) ?>
<?= $this->hook->render('template:task:show:before-timetracking', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/time_tracking_summary', array('task' => $task)) ?>
<?= $this->hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_external_link/show', array(
'task' => $task,
'links' => $external_links,
'project' => $project,
)) ?>
<?= $this->hook->render('template:task:show:before-attachements', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task_file/show', array(
'task' => $task,
'files' => $files,
@@ -44,8 +43,7 @@
)) ?>
<?= $this->hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?>
<?= $this->render('task/comments', array(
<?= $this->render('comments/show', array(
'task' => $task,
'comments' => $comments,
'project' => $project,

View File

@@ -23,18 +23,6 @@
<?= $this->url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<?php endif ?>
<li <?= $this->app->checkMenuSelection('subtask', 'show') ?>>
<i class="fa fa-tasks fa-fw"></i>
<?= $this->url->link(t('Sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('tasklink', 'show') ?>>
<i class="fa fa-code-fork fa-fw"></i>
<?= $this->url->link(t('Internal links'), 'tasklink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
<li <?= $this->app->checkMenuSelection('TaskExternalLink', 'show') ?>>
<i class="fa fa-external-link fa-fw"></i>
<?= $this->url->link(t('External links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
</li>
</ul>
<h2><?= t('Actions') ?></h2>
<ul>
@@ -54,6 +42,14 @@
<i class="fa fa-plus fa-fw"></i>
<?= $this->url->link(t('Add a sub-task'), 'subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-code-fork fa-fw"></i>
<?= $this->url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-external-link fa-fw"></i>
<?= $this->url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
</li>
<li>
<i class="fa fa-comment-o fa-fw"></i>
<?= $this->url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>