diff --git a/app/coffee/modules/tasks/detail.coffee b/app/coffee/modules/tasks/detail.coffee index 2f522949..9003b81e 100644 --- a/app/coffee/modules/tasks/detail.coffee +++ b/app/coffee/modules/tasks/detail.coffee @@ -30,7 +30,7 @@ module = angular.module("taigaTasks") ## Task Detail Controller ############################################################################# -class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin) +class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.AttachmentsMixin) @.$inject = [ "$scope", "$rootScope", @@ -39,10 +39,13 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin) "$tgResources", "$routeParams", "$q", - "$location" + "$location", + "$log" ] - constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) -> + constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @log) -> + @.attachmentsUrlName = "tasks/attachments" + @scope.taskRef = @params.taskref @scope.sectionName = "Task Details" @@ -95,6 +98,7 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin) return promise.then(=> @.loadProject()) .then(=> @.loadUsersAndRoles()) .then(=> @.loadTask()) + .then(=> @.loadAttachments(@scope.taskId)) .then(=> @.loadHistory()) getUserFullName: (userId) -> diff --git a/app/partials/task-detail-edit.jade b/app/partials/task-detail-edit.jade index 78d185ee..c97f56bf 100644 --- a/app/partials/task-detail-edit.jade +++ b/app/partials/task-detail-edit.jade @@ -26,7 +26,8 @@ block content section.us-content textarea(placeholder="Write a description of your task", ng-model="task.description", tg-markitup) - // include views/modules/attachments + include views/modules/attachments + textarea(ng-model="task.comment", placeholder="Write here a new commet") sidebar.menu-secondary.sidebar diff --git a/app/partials/task-detail.jade b/app/partials/task-detail.jade index 286e27f8..a80179d1 100644 --- a/app/partials/task-detail.jade +++ b/app/partials/task-detail.jade @@ -29,7 +29,8 @@ block content section.us-content.wysiwyg(tg-bind-html="task.description_html") - // include views/modules/attachments + include views/modules/attachments + section.us-activity ul.us-activity-tabs li