From 73bae9bb3425089babea5f2effe172e5a0938e2b Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 18 Mar 2016 21:16:25 -0400 Subject: Rename controller TaskLink to TaskInternalLink --- app/Template/task_internal_link/create.php | 33 ++++++++++++ app/Template/task_internal_link/edit.php | 34 ++++++++++++ app/Template/task_internal_link/remove.php | 15 ++++++ app/Template/task_internal_link/show.php | 14 +++++ app/Template/task_internal_link/table.php | 85 ++++++++++++++++++++++++++++++ 5 files changed, 181 insertions(+) create mode 100644 app/Template/task_internal_link/create.php create mode 100644 app/Template/task_internal_link/edit.php create mode 100644 app/Template/task_internal_link/remove.php create mode 100644 app/Template/task_internal_link/show.php create mode 100644 app/Template/task_internal_link/table.php (limited to 'app/Template/task_internal_link') diff --git a/app/Template/task_internal_link/create.php b/app/Template/task_internal_link/create.php new file mode 100644 index 00000000..94dcdd66 --- /dev/null +++ b/app/Template/task_internal_link/create.php @@ -0,0 +1,33 @@ + + +
+ + form->csrf() ?> + form->hidden('task_id', array('task_id' => $task['id'])) ?> + form->hidden('opposite_task_id', $values) ?> + + form->label(t('Label'), 'link_id') ?> + form->select('link_id', $labels, $values, $errors) ?> + + form->label(t('Task'), 'title') ?> + 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') ?> + +
+ + + url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> +
+
\ No newline at end of file diff --git a/app/Template/task_internal_link/edit.php b/app/Template/task_internal_link/edit.php new file mode 100644 index 00000000..03622df7 --- /dev/null +++ b/app/Template/task_internal_link/edit.php @@ -0,0 +1,34 @@ + + +
+ + form->csrf() ?> + form->hidden('id', $values) ?> + form->hidden('task_id', $values) ?> + form->hidden('opposite_task_id', $values) ?> + + form->label(t('Label'), 'link_id') ?> + form->select('link_id', $labels, $values, $errors) ?> + + form->label(t('Task'), 'title') ?> + 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') ?> + +
+ + + url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> +
+
\ No newline at end of file diff --git a/app/Template/task_internal_link/remove.php b/app/Template/task_internal_link/remove.php new file mode 100644 index 00000000..82156ece --- /dev/null +++ b/app/Template/task_internal_link/remove.php @@ -0,0 +1,15 @@ + + +
+

+ +

+ +
+ url->link(t('Yes'), 'TaskInternalLink', 'remove', array('link_id' => $link['id'], 'task_id' => $task['id'], 'project_id' => $task['project_id']), true, 'btn btn-red') ?> + + url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> +
+
\ No newline at end of file diff --git a/app/Template/task_internal_link/show.php b/app/Template/task_internal_link/show.php new file mode 100644 index 00000000..cc05429c --- /dev/null +++ b/app/Template/task_internal_link/show.php @@ -0,0 +1,14 @@ +
+
+

+
+
+ render('task_internal_link/table', array( + 'links' => $links, + 'task' => $task, + 'project' => $project, + 'editable' => $editable, + 'is_public' => $is_public, + )) ?> +
+
diff --git a/app/Template/task_internal_link/table.php b/app/Template/task_internal_link/table.php new file mode 100644 index 00000000..8f25b29b --- /dev/null +++ b/app/Template/task_internal_link/table.php @@ -0,0 +1,85 @@ + + + $grouped_links): ?> + + + + + + + + + + + + + + + + + + + + user->hasProjectAccess('Tasklink', 'edit', $task['project_id'])): ?> + + + + + + + \ No newline at end of file -- cgit v1.2.3