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/board/task_menu.php | 2 +- app/Template/task/dropdown.php | 2 +- app/Template/task/layout.php | 2 +- app/Template/task/menu.php | 2 +- app/Template/task/public.php | 2 +- app/Template/task/show.php | 2 +- app/Template/task/sidebar.php | 2 +- 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 ++++++++++++++++++++++++++++++ app/Template/tasklink/create.php | 33 ------------ app/Template/tasklink/edit.php | 34 ------------ app/Template/tasklink/remove.php | 15 ------ app/Template/tasklink/show.php | 14 ----- app/Template/tasklink/table.php | 85 ------------------------------ 17 files changed, 188 insertions(+), 188 deletions(-) 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 delete mode 100644 app/Template/tasklink/create.php delete mode 100644 app/Template/tasklink/edit.php delete mode 100644 app/Template/tasklink/remove.php delete mode 100644 app/Template/tasklink/show.php delete mode 100644 app/Template/tasklink/table.php (limited to 'app/Template') diff --git a/app/Template/board/task_menu.php b/app/Template/board/task_menu.php index bd582185..51a2e72e 100644 --- a/app/Template/board/task_menu.php +++ b/app/Template/board/task_menu.php @@ -6,7 +6,7 @@
  •  url->link(t('Change description'), 'taskmodification', 'description', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  •  url->link(t('Edit this task'), 'taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  •  url->link(t('Add a comment'), 'comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  • -
  •  url->link(t('Add a link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  • +
  •  url->link(t('Add a link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  •  url->link(t('Add external link'), 'TaskExternalLink', 'find', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  •  url->link(t('Add a screenshot'), 'BoardPopover', 'screenshot', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  • diff --git a/app/Template/task/dropdown.php b/app/Template/task/dropdown.php index 3300ccf0..f98f5172 100644 --- a/app/Template/task/dropdown.php +++ b/app/Template/task/dropdown.php @@ -21,7 +21,7 @@
  • - url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  • diff --git a/app/Template/task/layout.php b/app/Template/task/layout.php index b588384c..48360664 100644 --- a/app/Template/task/layout.php +++ b/app/Template/task/layout.php @@ -24,7 +24,7 @@ class="sidebar-container" id="task-view" data-edit-url="url->href('taskmodification', 'edit', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-subtask-url="url->href('subtask', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" - data-internal-link-url="url->href('tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" + data-internal-link-url="url->href('TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>" data-comment-url="url->href('comment', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"> render($sidebar_template, array('task' => $task)) ?> diff --git a/app/Template/task/menu.php b/app/Template/task/menu.php index cddd930a..fe30d06e 100644 --- a/app/Template/task/menu.php +++ b/app/Template/task/menu.php @@ -26,7 +26,7 @@
  • - url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  • diff --git a/app/Template/task/public.php b/app/Template/task/public.php index 723882c3..94782163 100644 --- a/app/Template/task/public.php +++ b/app/Template/task/public.php @@ -13,7 +13,7 @@ 'editable' => false )) ?> - render('tasklink/show', array( + render('task_internal_link/show', array( 'task' => $task, 'links' => $links, 'project' => $project, diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 98221bcf..d68f6c48 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -19,7 +19,7 @@ )) ?> hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?> -render('tasklink/show', array( +render('task_internal_link/show', array( 'task' => $task, 'links' => $internal_links, 'project' => $project, diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index 955b17c4..ee3b1594 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -44,7 +44,7 @@
  • - url->link(t('Add internal link'), 'tasklink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?> + url->link(t('Add internal link'), 'TaskInternalLink', 'create', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'popover') ?>
  • 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 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 @@ - - -
    - - 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/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 @@ - - -
    - - 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/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 @@ - - -
    -

    - -

    - -
    - url->link(t('Yes'), 'tasklink', '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/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 @@ -
    -
    -

    -
    -
    - render('tasklink/table', array( - 'links' => $links, - 'task' => $task, - 'project' => $project, - 'editable' => $editable, - 'is_public' => $is_public, - )) ?> -
    -
    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 @@ - - - $grouped_links): ?> - - - - - - - - - - - - - - - - - - - - user->hasProjectAccess('Tasklink', 'edit', $task['project_id'])): ?> - - - - - - - \ No newline at end of file -- cgit v1.2.3