summaryrefslogtreecommitdiff
path: root/app/Template/task_external_link/table.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/task_external_link/table.php')
-rw-r--r--app/Template/task_external_link/table.php35
1 files changed, 15 insertions, 20 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>