1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
<?php if (! empty($links)): ?>
<table class="task-links-table table-striped table-scrolling">
<?php foreach ($links as $label => $grouped_links): ?>
<?php $hide_td = false ?>
<?php foreach ($grouped_links as $link): ?>
<?php if (! $hide_td): ?>
<tr>
<th class="column-45">
<?= t('This task') ?>
<em><?= t($label) ?></em>
<span class="task-links-task-count">(<?= count($grouped_links) ?>)</span>
</th>
<th class="column-15"><?= t('Assignee') ?></th>
<th><?= t('Time tracking') ?></th>
</tr>
<?php $hide_td = true ?>
<?php endif ?>
<tr>
<td>
<?php if ($is_public): ?>
<?= $this->url->link(
$this->text->e('#'.$link['task_id'].' '.$link['title']),
'TaskViewController',
'readonly',
array('task_id' => $link['task_id'], 'token' => $project['token']),
false,
$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',
'show',
array('task_id' => $link['task_id'], 'project_id' => $link['project_id']),
false,
$link['is_active'] ? '' : 'task-link-closed'
) ?>
<?php endif ?>
(<?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'])): ?>
<?php if ($editable): ?>
<?= $this->url->link($this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']), 'UserViewController', 'show', array('user_id' => $link['task_assignee_id'])) ?>
<?php else: ?>
<?= $this->text->e($link['task_assignee_name'] ?: $link['task_assignee_username']) ?>
<?php endif ?>
<?php endif ?>
</td>
<td>
<?php if (! empty($link['task_time_spent'])): ?>
<?= t('%sh spent', n($subtask['time_spent'])) ?>
<?php endif ?>
<?php if (! empty($subtask['time_spent']) && ! empty($subtask['time_estimated'])): ?>/<?php endif ?>
<?php if (! empty($link['task_time_estimated'])): ?>
<?= t('%sh estimated', n($subtask['time_estimated'])) ?>
<?php endif ?>
</td>
</tr>
<?php endforeach ?>
<?php endforeach ?>
</table>
<?php endif ?>
|