summaryrefslogtreecommitdiff
path: root/app/Template/tasklink
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/tasklink')
-rw-r--r--app/Template/tasklink/create.php33
-rw-r--r--app/Template/tasklink/edit.php34
-rw-r--r--app/Template/tasklink/remove.php15
-rw-r--r--app/Template/tasklink/show.php14
-rw-r--r--app/Template/tasklink/table.php85
5 files changed, 0 insertions, 181 deletions
diff --git a/app/Template/tasklink/create.php b/app/Template/tasklink/create.php
deleted file mode 100644
index 02d38a9b..00000000
--- a/app/Template/tasklink/create.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<div class="page-header">
- <h2><?= t('Add a new link') ?></h2>
-</div>
-
-<form class="popover-form" action="<?= $this->url->href('tasklink', 'save', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" method="post" autocomplete="off">
-
- <?= $this->form->csrf() ?>
- <?= $this->form->hidden('task_id', array('task_id' => $task['id'])) ?>
- <?= $this->form->hidden('opposite_task_id', $values) ?>
-
- <?= $this->form->label(t('Label'), 'link_id') ?>
- <?= $this->form->select('link_id', $labels, $values, $errors) ?>
-
- <?= $this->form->label(t('Task'), 'title') ?>
- <?= $this->form->text(
- 'title',
- $values,
- $errors,
- array(
- 'required',
- 'placeholder="'.t('Start to type task title...').'"',
- 'title="'.t('Start to type task title...').'"',
- 'data-dst-field="opposite_task_id"',
- 'data-search-url="'.$this->url->href('TaskHelper', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
- ),
- 'autocomplete') ?>
-
- <div class="form-actions">
- <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
- </div>
-</form> \ No newline at end of file
diff --git a/app/Template/tasklink/edit.php b/app/Template/tasklink/edit.php
deleted file mode 100644
index b174c348..00000000
--- a/app/Template/tasklink/edit.php
+++ /dev/null
@@ -1,34 +0,0 @@
-<div class="page-header">
- <h2><?= t('Edit link') ?></h2>
-</div>
-
-<form action="<?= $this->url->href('tasklink', 'update', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'link_id' => $task_link['id'])) ?>" method="post" autocomplete="off">
-
- <?= $this->form->csrf() ?>
- <?= $this->form->hidden('id', $values) ?>
- <?= $this->form->hidden('task_id', $values) ?>
- <?= $this->form->hidden('opposite_task_id', $values) ?>
-
- <?= $this->form->label(t('Label'), 'link_id') ?>
- <?= $this->form->select('link_id', $labels, $values, $errors) ?>
-
- <?= $this->form->label(t('Task'), 'title') ?>
- <?= $this->form->text(
- 'title',
- $values,
- $errors,
- array(
- 'required',
- 'placeholder="'.t('Start to type task title...').'"',
- 'title="'.t('Start to type task title...').'"',
- 'data-dst-field="opposite_task_id"',
- 'data-search-url="'.$this->url->href('TaskHelper', 'autocomplete', array('exclude_task_id' => $task['id'])).'"',
- ),
- 'autocomplete') ?>
-
- <div class="form-actions">
- <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
- </div>
-</form> \ No newline at end of file
diff --git a/app/Template/tasklink/remove.php b/app/Template/tasklink/remove.php
deleted file mode 100644
index 42bf3012..00000000
--- a/app/Template/tasklink/remove.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<div class="page-header">
- <h2><?= t('Remove a link') ?></h2>
-</div>
-
-<div class="confirm">
- <p class="alert alert-info">
- <?= t('Do you really want to remove this link with task #%d?', $link['opposite_task_id']) ?>
- </p>
-
- <div class="form-actions">
- <?= $this->url->link(t('Yes'), 'tasklink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
- </div>
-</div> \ No newline at end of file
diff --git a/app/Template/tasklink/show.php b/app/Template/tasklink/show.php
deleted file mode 100644
index 9f718fc9..00000000
--- a/app/Template/tasklink/show.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<section class="accordion-section <?= empty($links) ? 'accordion-collapsed' : '' ?>">
- <div class="accordion-title">
- <h3><a href="#" class="fa accordion-toggle"></a> <?= t('Internal links') ?></h3>
- </div>
- <div class="accordion-content">
- <?= $this->render('tasklink/table', array(
- 'links' => $links,
- 'task' => $task,
- 'project' => $project,
- 'editable' => $editable,
- 'is_public' => $is_public,
- )) ?>
- </div>
-</section>
diff --git a/app/Template/tasklink/table.php b/app/Template/tasklink/table.php
deleted file mode 100644
index df7bc4f5..00000000
--- a/app/Template/tasklink/table.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php if (! empty($links)): ?>
-<table class="task-links-table table-stripped">
- <?php foreach ($links as $label => $grouped_links): ?>
- <?php $hide_td = false ?>
- <?php foreach ($grouped_links as $link): ?>
- <?php if (! $hide_td): ?>
- <tr>
- <td class="column-40" colspan="2">
- <?= t('This task') ?>
- <strong><?= t($label) ?></strong>
- <span class="task-links-task-count">(<?= count($grouped_links) ?>)</span>
- </td>
- <th><?= 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): ?>
- <?= $this->url->link(
- $this->text->e('#'.$link['task_id'].' '.$link['title']),
- 'task',
- 'readonly',
- array('task_id' => $link['task_id'], 'token' => $project['token']),
- false,
- $link['is_active'] ? '' : 'task-link-closed'
- ) ?>
- <?php else: ?>
- <?= $this->url->link(
- $this->text->e('#'.$link['task_id'].' '.$link['title']),
- 'task',
- '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']): ?>
- <br>
- <?= $this->text->e($link['project_name']) ?>
- <?php endif ?>
- </td>
- <td>
- <?= $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']), 'user', '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'])): ?>
- <strong><?= $this->text->e($link['task_time_spent']).'h' ?></strong> <?= t('spent') ?>
- <?php endif ?>
-
- <?php if (! empty($link['task_time_estimated'])): ?>
- <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->url->link(t('Edit'), 'tasklink', 'edit', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
- <li><?= $this->url->link(t('Remove'), 'tasklink', 'confirm', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?></li>
- </ul>
- </div>
- </td>
- <?php endif ?>
- </tr>
- <?php endforeach ?>
- <?php endforeach ?>
-</table>
-<?php endif ?> \ No newline at end of file