Show active attachments of wiki pages
parent
d00ea43289
commit
b194b8edc3
|
@ -31,7 +31,7 @@ module = angular.module("taigaWiki")
|
||||||
## Wiki Detail Controller
|
## Wiki Detail Controller
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.AttachmentsMixin)
|
||||||
@.$inject = [
|
@.$inject = [
|
||||||
"$scope",
|
"$scope",
|
||||||
"$rootScope",
|
"$rootScope",
|
||||||
|
@ -42,9 +42,12 @@ class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
"$q",
|
"$q",
|
||||||
"$location",
|
"$location",
|
||||||
"$filter",
|
"$filter",
|
||||||
|
"$log"
|
||||||
]
|
]
|
||||||
|
|
||||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @filter) ->
|
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @filter, @log) ->
|
||||||
|
@.attachmentsUrlName = "wiki/attachments"
|
||||||
|
|
||||||
@scope.projectSlug = @params.pslug
|
@scope.projectSlug = @params.pslug
|
||||||
@scope.wikiSlug = @params.slug
|
@scope.wikiSlug = @params.slug
|
||||||
@scope.sectionName = "Wiki"
|
@scope.sectionName = "Wiki"
|
||||||
|
@ -85,6 +88,7 @@ class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
.then(=> @.loadUsersAndRoles())
|
.then(=> @.loadUsersAndRoles())
|
||||||
.then(=> @.loadWikiLinks())
|
.then(=> @.loadWikiLinks())
|
||||||
.then(=> @.loadWiki())
|
.then(=> @.loadWiki())
|
||||||
|
.then(=> @.loadAttachments(@scope.wikiId))
|
||||||
|
|
||||||
edit: ->
|
edit: ->
|
||||||
@location.path("/project/#{@scope.projectSlug}/wiki/#{@scope.wikiSlug}/edit")
|
@location.path("/project/#{@scope.projectSlug}/wiki/#{@scope.wikiSlug}/edit")
|
||||||
|
|
|
@ -21,4 +21,4 @@ block content
|
||||||
section.wysiwyg
|
section.wysiwyg
|
||||||
textarea(placeholder="Write a your wiki page", ng-model="wiki.content", tg-markitup)
|
textarea(placeholder="Write a your wiki page", ng-model="wiki.content", tg-markitup)
|
||||||
|
|
||||||
//include views/modules/attachments
|
include views/modules/attachments
|
||||||
|
|
|
@ -23,4 +23,4 @@ block content
|
||||||
|
|
||||||
section.wiki-content.wysiwyg(tg-bind-html="wiki.html")
|
section.wiki-content.wysiwyg(tg-bind-html="wiki.html")
|
||||||
|
|
||||||
//include views/modules/attachments
|
include views/modules/attachments
|
||||||
|
|
Loading…
Reference in New Issue