diff --git a/ChangeLog b/ChangeLog index 031db8492..79c389a9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Version 1.0.27 (unreleased) Improvements: +* Improve task summary sections * Put back the action sidebar in task view * Added support for multiple placeholders for LDAP_USER_FILTER * Added local file link provider diff --git a/Makefile b/Makefile index 3c60d31af..50c5a06d9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ BUILD_DIR = /tmp -CSS_APP = $(addprefix assets/css/src/, $(addsuffix .css, base links title table form button alert tooltip header board task comment subtask tasklink markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown upload filters gantt project files views)) +CSS_APP = $(addprefix assets/css/src/, $(addsuffix .css, base links title table form button alert tooltip header board task comment subtask tasklink markdown listing activity dashboard pagination popover confirm sidebar responsive dropdown upload filters gantt project files views accordion)) CSS_PRINT = $(addprefix assets/css/src/, $(addsuffix .css, print links table board task comment subtask tasklink markdown)) CSS_VENDOR = $(addprefix assets/css/vendor/, $(addsuffix .css, jquery-ui.min jquery-ui-timepicker-addon.min chosen.min fullcalendar.min font-awesome.min c3.min)) -JS_APP = $(addprefix assets/js/src/, $(addsuffix .js, Popover Dropdown Tooltip Markdown Search App Screenshot FileUpload Calendar Board Column Swimlane Gantt Task Project Subtask TaskRepartitionChart UserRepartitionChart CumulativeFlowDiagram BurndownChart AvgTimeColumnChart TaskTimeColumnChart LeadCycleTimeChart CompareHoursColumnChart Router)) +JS_APP = $(addprefix assets/js/src/, $(addsuffix .js, Popover Dropdown Tooltip Markdown Search App Screenshot FileUpload Calendar Board Column Swimlane Gantt Task Project Subtask TaskRepartitionChart UserRepartitionChart CumulativeFlowDiagram BurndownChart AvgTimeColumnChart TaskTimeColumnChart LeadCycleTimeChart CompareHoursColumnChart Accordion Router)) JS_VENDOR = $(addprefix assets/js/vendor/, $(addsuffix .js, jquery-1.11.3.min jquery-ui.min jquery-ui-timepicker-addon.min jquery.ui.touch-punch.min chosen.jquery.min moment.min fullcalendar.min mousetrap.min mousetrap-global-bind.min jquery.textcomplete)) JS_LANG = $(addprefix assets/js/vendor/lang/, $(addsuffix .js, cs da de es el fi fr hu id it ja nl nb pl pt pt-br ru sv sr th tr zh-cn)) diff --git a/app/Controller/Subtask.php b/app/Controller/Subtask.php index bc2108f9c..dea2b08e8 100644 --- a/app/Controller/Subtask.php +++ b/app/Controller/Subtask.php @@ -10,23 +10,6 @@ namespace Kanboard\Controller; */ class Subtask extends Base { - /** - * Show list of subtasks - */ - public function show() - { - $task = $this->getTask(); - - $this->response->html($this->helper->layout->task('subtask/show', array( - 'users_list' => $this->projectUserRole->getAssignableUsersList($task['project_id']), - 'task' => $task, - 'project' => $this->getProject(), - 'subtasks' => $this->subtask->getAll($task['id']), - 'editable' => true, - 'show_title' => true, - ))); - } - /** * Creation form * diff --git a/app/Controller/Task.php b/app/Controller/Task.php index aeaf57920..dc10604ec 100644 --- a/app/Controller/Task.php +++ b/app/Controller/Task.php @@ -76,7 +76,8 @@ class Task extends Base 'images' => $this->taskFile->getAllImages($task['id']), 'comments' => $this->comment->getAll($task['id'], $this->userSession->getCommentSorting()), 'subtasks' => $subtasks, - 'links' => $this->taskLink->getAllGroupedByLabel($task['id']), + 'internal_links' => $this->taskLink->getAllGroupedByLabel($task['id']), + 'external_links' => $this->taskExternalLink->getAll($task['id']), 'task' => $task, 'values' => $values, 'link_label_list' => $this->link->getList(0, false), diff --git a/app/Controller/TaskExternalLink.php b/app/Controller/TaskExternalLink.php index 72015686c..0db8ec371 100644 --- a/app/Controller/TaskExternalLink.php +++ b/app/Controller/TaskExternalLink.php @@ -12,22 +12,6 @@ use Kanboard\Core\ExternalLink\ExternalLinkProviderNotFound; */ class TaskExternalLink extends Base { - /** - * Creation form - * - * @access public - */ - public function show() - { - $task = $this->getTask(); - - $this->response->html($this->helper->layout->task('task_external_link/show', array( - 'links' => $this->taskExternalLink->getAll($task['id']), - 'task' => $task, - 'title' => t('List of external links'), - ))); - } - /** * First creation form * @@ -90,7 +74,7 @@ class TaskExternalLink extends Base if ($valid && $this->taskExternalLink->create($values)) { $this->flash->success(t('Link added successfully.')); - return $this->response->redirect($this->helper->url->to('TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } $this->edit($values, $errors); @@ -137,7 +121,7 @@ class TaskExternalLink extends Base if ($valid && $this->taskExternalLink->update($values)) { $this->flash->success(t('Link updated successfully.')); - return $this->response->redirect($this->helper->url->to('TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); + return $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])), true); } $this->edit($values, $errors); @@ -180,6 +164,6 @@ class TaskExternalLink extends Base $this->flash->failure(t('Unable to remove this link.')); } - $this->response->redirect($this->helper->url->to('TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); + $this->response->redirect($this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']))); } } diff --git a/app/Controller/Tasklink.php b/app/Controller/Tasklink.php index b051caad4..a7f4914bf 100644 --- a/app/Controller/Tasklink.php +++ b/app/Controller/Tasklink.php @@ -28,27 +28,6 @@ class Tasklink extends Base return $link; } - /** - * Show links - * - * @access public - */ - public function show() - { - $task = $this->getTask(); - $project = $this->project->getById($task['project_id']); - - $this->response->html($this->helper->layout->task('tasklink/show', array( - 'links' => $this->taskLink->getAllGroupedByLabel($task['id']), - 'task' => $task, - 'project' => $project, - 'link_label_list' => $this->link->getList(0, false), - 'editable' => true, - 'is_public' => false, - 'show_title' => true, - ))); - } - /** * Creation form * diff --git a/app/Template/comment/create.php b/app/Template/comment/create.php index 574eec9f5..58b4abdf8 100644 --- a/app/Template/comment/create.php +++ b/app/Template/comment/create.php @@ -1,7 +1,7 @@ -
+ form->csrf() ?> form->hidden('task_id', $values) ?> form->hidden('user_id', $values) ?> @@ -21,7 +21,7 @@ $values, $errors, array( - ! isset($skip_cancel) ? 'autofocus' : '', + 'autofocus', 'required', 'placeholder="'.t('Leave a comment').'"', 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"', @@ -38,9 +38,7 @@
- - - url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?> - + + url->link(t('cancel'), 'task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id']), false, 'close-popover') ?>
diff --git a/app/Template/comments/create.php b/app/Template/comments/create.php new file mode 100644 index 000000000..87d694915 --- /dev/null +++ b/app/Template/comments/create.php @@ -0,0 +1,36 @@ +
+ form->csrf() ?> + form->hidden('task_id', $values) ?> + form->hidden('user_id', $values) ?> + +
+ +
+ form->textarea( + 'comment', + $values, + $errors, + array( + 'required', + 'placeholder="'.t('Leave a comment').'"', + 'data-mention-search-url="'.$this->url->href('UserHelper', 'mention', array('project_id' => $task['project_id'])).'"', + ), + 'comment-textarea' + ) ?> +
+
+
+
+
+ +
+ +
+
diff --git a/app/Template/comments/show.php b/app/Template/comments/show.php new file mode 100644 index 000000000..ccc1d9cc8 --- /dev/null +++ b/app/Template/comments/show.php @@ -0,0 +1,31 @@ +
+
+

+
+
+
+ + url->link(t('change sorting'), 'comment', 'toggleSorting', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> +
+ + render('comment/show', array( + 'comment' => $comment, + 'task' => $task, + 'project' => $project, + 'editable' => $editable, + 'is_public' => isset($is_public) && $is_public, + )) ?> + + + + render('comments/create', array( + 'values' => array( + 'user_id' => $this->user->getId(), + 'task_id' => $task['id'], + ), + 'errors' => array(), + 'task' => $task, + )) ?> + +
+
\ No newline at end of file diff --git a/app/Template/subtask/show.php b/app/Template/subtask/show.php index 0e94a3059..fe436d518 100644 --- a/app/Template/subtask/show.php +++ b/app/Template/subtask/show.php @@ -1,32 +1,12 @@ - -
-

text->e($task['title']) ?>

-
- - - - -
- - render('subtask/table', array('subtasks' => $subtasks, 'task' => $task, 'editable' => $editable)) ?> - - user->hasProjectAccess('subtask', 'save', $task['project_id'])): ?> -
- form->csrf() ?> - form->hidden('task_id', array('task_id' => $task['id'])) ?> - form->text('title', array(), array(), array('required', 'placeholder="'.t('Type here to create a new sub-task').'"')) ?> - form->numeric('time_estimated', array(), array(), array('placeholder="'.t('Original estimate').'"')) ?> - form->select('user_id', $users_list, array(), array(), array('placeholder="'.t('Assignee').'"')) ?> - -
- - -
+
+
+

+
+
+ render('subtask/table', array( + 'subtasks' => $subtasks, + 'task' => $task, + 'editable' => $editable + )) ?> +
+
diff --git a/app/Template/subtask/table.php b/app/Template/subtask/table.php index 0af02dcf4..40510a2f7 100644 --- a/app/Template/subtask/table.php +++ b/app/Template/subtask/table.php @@ -66,6 +66,4 @@ - -

diff --git a/app/Template/task/comments.php b/app/Template/task/comments.php deleted file mode 100644 index c22e39ecb..000000000 --- a/app/Template/task/comments.php +++ /dev/null @@ -1,35 +0,0 @@ - -
- - - - render('comment/show', array( - 'comment' => $comment, - 'task' => $task, - 'project' => $project, - 'editable' => $editable, - 'is_public' => isset($is_public) && $is_public, - )) ?> - - - - render('comment/create', array( - 'skip_cancel' => true, - 'values' => array( - 'user_id' => $this->user->getId(), - 'task_id' => $task['id'], - ), - 'errors' => array(), - 'task' => $task, - )) ?> - -
- \ No newline at end of file diff --git a/app/Template/task/description.php b/app/Template/task/description.php index b84e9f420..9ffe8589c 100644 --- a/app/Template/task/description.php +++ b/app/Template/task/description.php @@ -1,16 +1,9 @@ - -
- - -
+
+
+

+
+
+
text->markdown( $task['description'], @@ -36,4 +29,4 @@
- \ No newline at end of file +
\ No newline at end of file diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 61f6c8484..a7c4ad015 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -32,6 +32,13 @@ url->link(t('Public link'), 'task', 'readonly', array('task_id' => $task['id'], 'token' => $project['token']), false, '', '', true) ?> + +
  • + + url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?> +
  • + +
  • diff --git a/app/Template/task/public.php b/app/Template/task/public.php index 0052214ad..723882c32 100644 --- a/app/Template/task/public.php +++ b/app/Template/task/public.php @@ -1,9 +1,6 @@
    - render('task/details', array('task' => $task, 'project' => $project, 'editable' => false)) ?> -

    url->link(t('Back to the board'), 'board', 'readonly', array('token' => $project['token'])) ?>

    - render('task/description', array( 'task' => $task, 'project' => $project, @@ -24,12 +21,11 @@ 'is_public' => true, )) ?> - render('task/comments', array( + render('comments/show', array( 'task' => $task, 'comments' => $comments, 'project' => $project, 'editable' => false, 'is_public' => true, )) ?> - -
    \ No newline at end of file + diff --git a/app/Template/task/show.php b/app/Template/task/show.php index 5dc27ca1d..98221bcf1 100644 --- a/app/Template/task/show.php +++ b/app/Template/task/show.php @@ -7,11 +7,9 @@ )) ?> hook->render('template:task:show:before-description', array('task' => $task, 'project' => $project)) ?> - render('task/description', array('task' => $task)) ?> hook->render('template:task:show:before-subtasks', array('task' => $task, 'project' => $project)) ?> - render('subtask/show', array( 'task' => $task, 'subtasks' => $subtasks, @@ -20,23 +18,24 @@ 'editable' => true, )) ?> -hook->render('template:task:show:before-tasklinks', array('task' => $task, 'project' => $project)) ?> - +hook->render('template:task:show:before-internal-links', array('task' => $task, 'project' => $project)) ?> render('tasklink/show', array( 'task' => $task, - 'links' => $links, + 'links' => $internal_links, 'project' => $project, 'link_label_list' => $link_label_list, 'editable' => true, 'is_public' => false, )) ?> -hook->render('template:task:show:before-timetracking', array('task' => $task, 'project' => $project)) ?> - -render('task/time_tracking_summary', array('task' => $task)) ?> +hook->render('template:task:show:before-external-links', array('task' => $task, 'project' => $project)) ?> +render('task_external_link/show', array( + 'task' => $task, + 'links' => $external_links, + 'project' => $project, +)) ?> hook->render('template:task:show:before-attachements', array('task' => $task, 'project' => $project)) ?> - render('task_file/show', array( 'task' => $task, 'files' => $files, @@ -44,8 +43,7 @@ )) ?> hook->render('template:task:show:before-comments', array('task' => $task, 'project' => $project)) ?> - -render('task/comments', array( +render('comments/show', array( 'task' => $task, 'comments' => $comments, 'project' => $project, diff --git a/app/Template/task/sidebar.php b/app/Template/task/sidebar.php index e9af71a53..955b17c4d 100644 --- a/app/Template/task/sidebar.php +++ b/app/Template/task/sidebar.php @@ -23,18 +23,6 @@ url->link(t('Time tracking'), 'task', 'timetracking', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> -
  • app->checkMenuSelection('subtask', 'show') ?>> - - url->link(t('Sub-tasks'), 'subtask', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> -
  • -
  • app->checkMenuSelection('tasklink', 'show') ?>> - - url->link(t('Internal links'), 'tasklink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> -
  • -
  • app->checkMenuSelection('TaskExternalLink', 'show') ?>> - - url->link(t('External links'), 'TaskExternalLink', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?> -