summaryrefslogtreecommitdiff
path: root/app/Template/task_external_link/table.php
blob: ea22d4368d5f3114717d521f633c009181077e45 (plain)
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
<?php if (! empty($links)): ?>
<table class="table-striped table-scrolling">
    <tr>
        <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>
    </tr>
    <?php foreach ($links as $link): ?>
        <tr>
            <td>
                <?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'] ?>" title="<?= $this->text->e($link['url']) ?>" target="_blank"><?= $this->text->e($link['title']) ?></a>
            </td>
            <td>
                <?= $this->text->e($link['dependency_label']) ?>
            </td>
            <td>
                <?= $this->text->e($link['creator_name'] ?: $link['creator_username']) ?>
            </td>
            <td>
                <?= $this->dt->date($link['date_creation']) ?>
            </td>
        </tr>
    <?php endforeach ?>
</table>
<?php endif ?>