summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-18 16:25:59 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-18 16:25:59 -0500
commitab40004558cbfcd3701d2a33788c6928bcd3144f (patch)
tree47d75b5a29ee1ff9f0dca6952f6790b0668ae290 /app
parentd67e9d35ed16e731bc0380595e467726c1493cbf (diff)
Improve task view table
Diffstat (limited to 'app')
-rw-r--r--app/Template/task_external_link/table.php35
-rw-r--r--app/Template/task_internal_link/table.php49
2 files changed, 34 insertions, 50 deletions
diff --git a/app/Template/task_external_link/table.php b/app/Template/task_external_link/table.php
index aaa234bb..e345037e 100644
--- a/app/Template/task_external_link/table.php
+++ b/app/Template/task_external_link/table.php
@@ -1,19 +1,29 @@
<?php if (! empty($links)): ?>
<table class="table-striped table-scrolling">
<tr>
- <th class="column-10"><?= t('Type') ?></th>
+ <th class="column-15"><?= t('Type') ?></th>
<th><?= t('Title') ?></th>
<th class="column-10"><?= t('Dependency') ?></th>
<th class="column-15"><?= t('Creator') ?></th>
<th class="column-15"><?= t('Date') ?></th>
- <?php if ($this->user->hasProjectAccess('TaskExternalLinkController', 'edit', $task['project_id'])): ?>
- <th class="column-5"><?= t('Action') ?></th>
- <?php endif ?>
</tr>
<?php foreach ($links as $link): ?>
<tr>
<td>
- <?= $link['type'] ?>
+ <?php if ($this->user->hasProjectAccess('TaskExternalLinkController', 'edit', $task['project_id'])): ?>
+ <div class="dropdown">
+ <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
+ <ul>
+ <li>
+ <?= $this->modal->medium('edit', t('Edit'), 'TaskExternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskExternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ </ul>
+ </div>
+ <?php endif ?>
+ <?= $this->text->e($link['type']) ?>
</td>
<td>
<a href="<?= $link['url'] ?>" target="_blank"><?= $this->text->e($link['title']) ?></a>
@@ -27,21 +37,6 @@
<td>
<?= $this->dt->date($link['date_creation']) ?>
</td>
- <?php if ($this->user->hasProjectAccess('TaskExternalLinkController', 'edit', $task['project_id'])): ?>
- <td>
- <div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
- <ul>
- <li>
- <?= $this->modal->medium('edit', t('Edit'), 'TaskExternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li>
- <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskExternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- </ul>
- </div>
- </td>
- <?php endif ?>
</tr>
<?php endforeach ?>
</table>
diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php
index 255ecc97..9ef20645 100644
--- a/app/Template/task_internal_link/table.php
+++ b/app/Template/task_internal_link/table.php
@@ -5,20 +5,16 @@
<?php foreach ($grouped_links as $link): ?>
<?php if (! $hide_td): ?>
<tr>
- <td class="column-40" colspan="2">
+ <th class="column-45">
<?= t('This task') ?>
- <strong><?= t($label) ?></strong>
+ <em><?= t($label) ?></em>
<span class="task-links-task-count">(<?= count($grouped_links) ?>)</span>
- </td>
- <th><?= t('Assignee') ?></th>
+ </th>
+ <th class="column-15"><?= t('Assignee') ?></th>
<th><?= t('Time tracking') ?></th>
- <?php if ($editable): ?>
- <th class="column-5"></th>
- <?php endif ?>
</tr>
<?php $hide_td = true ?>
<?php endif ?>
-
<tr>
<td>
<?php if ($is_public): ?>
@@ -31,6 +27,20 @@
$link['is_active'] ? '' : 'task-link-closed'
) ?>
<?php else: ?>
+ <?php if ($editable && $this->user->hasProjectAccess('Tasklink', 'edit', $task['project_id'])): ?>
+ <div class="dropdown">
+ <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog"></i><i class="fa fa-caret-down"></i></a>
+ <ul>
+ <li>
+ <?= $this->modal->medium('edit', t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ <li>
+ <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
+ </li>
+ </ul>
+ </div>
+ <?php endif ?>
+
<?= $this->url->link(
$this->text->e('#'.$link['task_id'].' '.$link['title']),
'TaskViewController',
@@ -41,13 +51,7 @@
) ?>
<?php endif ?>
- <?php if ($link['project_id'] != $project['id']): ?>
- <br>
- <?= $this->text->e($link['project_name']) ?>
- <?php endif ?>
- </td>
- <td>
- <?= $this->text->e($link['column_title']) ?>
+ (<?php if ($link['project_id'] != $project['id']): ?><?= $this->text->e($link['project_name']) ?> - <?php endif ?><?= $this->text->e($link['column_title']) ?>)
</td>
<td>
<?php if (! empty($link['task_assignee_username'])): ?>
@@ -67,21 +71,6 @@
<strong><?= $this->text->e($link['task_time_estimated']).'h' ?></strong> <?= t('estimated') ?>
<?php endif ?>
</td>
- <?php if ($editable && $this->user->hasProjectAccess('Tasklink', 'edit', $task['project_id'])): ?>
- <td>
- <div class="dropdown">
- <a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-cog fa-fw"></i><i class="fa fa-caret-down"></i></a>
- <ul>
- <li>
- <?= $this->modal->medium('edit', t('Edit'), 'TaskInternalLinkController', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- <li>
- <?= $this->modal->confirm('trash-o', t('Remove'), 'TaskInternalLinkController', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
- </li>
- </ul>
- </div>
- </td>
- <?php endif ?>
</tr>
<?php endforeach ?>
<?php endforeach ?>