Show active attachments of tasks

stable
David Barragán Merino 2014-07-29 00:22:05 +02:00
parent 898b040246
commit d00ea43289
3 changed files with 11 additions and 5 deletions

View File

@ -30,7 +30,7 @@ module = angular.module("taigaTasks")
## Task Detail Controller ## Task Detail Controller
############################################################################# #############################################################################
class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin) class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.AttachmentsMixin)
@.$inject = [ @.$inject = [
"$scope", "$scope",
"$rootScope", "$rootScope",
@ -39,10 +39,13 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
"$tgResources", "$tgResources",
"$routeParams", "$routeParams",
"$q", "$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.taskRef = @params.taskref
@scope.sectionName = "Task Details" @scope.sectionName = "Task Details"
@ -95,6 +98,7 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
return promise.then(=> @.loadProject()) return promise.then(=> @.loadProject())
.then(=> @.loadUsersAndRoles()) .then(=> @.loadUsersAndRoles())
.then(=> @.loadTask()) .then(=> @.loadTask())
.then(=> @.loadAttachments(@scope.taskId))
.then(=> @.loadHistory()) .then(=> @.loadHistory())
getUserFullName: (userId) -> getUserFullName: (userId) ->

View File

@ -26,7 +26,8 @@ block content
section.us-content section.us-content
textarea(placeholder="Write a description of your task", ng-model="task.description", tg-markitup) 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") textarea(ng-model="task.comment", placeholder="Write here a new commet")
sidebar.menu-secondary.sidebar sidebar.menu-secondary.sidebar

View File

@ -29,7 +29,8 @@ block content
section.us-content.wysiwyg(tg-bind-html="task.description_html") section.us-content.wysiwyg(tg-bind-html="task.description_html")
// include views/modules/attachments include views/modules/attachments
section.us-activity section.us-activity
ul.us-activity-tabs ul.us-activity-tabs
li li