set the current page title
parent
4b52dd32e3
commit
e644822a25
|
@ -39,10 +39,11 @@ class MembershipsController extends mixOf(taiga.Controller, taiga.PageMixin, tai
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$tgLocation"
|
||||
"$tgLocation",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @appTitle) ->
|
||||
_.bindAll(@)
|
||||
|
||||
@scope.sectionName = "Memberships" #i18n
|
||||
|
@ -50,6 +51,10 @@ class MembershipsController extends mixOf(taiga.Controller, taiga.PageMixin, tai
|
|||
@scope.filters = {}
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Membership - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -43,13 +43,18 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$location"
|
||||
"$location",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @appTitle) ->
|
||||
@scope.project = {}
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Project profile - " + @scope.sectionName + " - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -43,13 +43,18 @@ class ProjectValuesController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$location"
|
||||
"$location",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @appTitle) ->
|
||||
@scope.project = {}
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Project values - " + @scope.sectionName + " - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -40,16 +40,21 @@ class RolesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fil
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$tgLocation"
|
||||
"$tgLocation",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @appTitle) ->
|
||||
_.bindAll(@)
|
||||
|
||||
@scope.sectionName = "Roles" #i18n
|
||||
@scope.project = {}
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Roles - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -42,10 +42,11 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$tgLocation"
|
||||
"$tgLocation",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @appTitle) ->
|
||||
_.bindAll(@)
|
||||
|
||||
@scope.sectionName = "Backlog"
|
||||
|
@ -53,6 +54,9 @@ class BacklogController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.F
|
|||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Backlog - " + @scope.project.name)
|
||||
|
||||
promise.then null, =>
|
||||
console.log "FAIL"
|
||||
|
||||
|
|
|
@ -408,3 +408,15 @@ ToggleCommentDirective = () ->
|
|||
return {link:link}
|
||||
|
||||
module.directive("tgToggleComment", ToggleCommentDirective)
|
||||
|
||||
#############################################################################
|
||||
## Set the page title
|
||||
#############################################################################
|
||||
|
||||
AppTitle = () ->
|
||||
set = (text) ->
|
||||
$("title").text(text)
|
||||
|
||||
return {set: set}
|
||||
|
||||
module.factory("$appTitle", AppTitle)
|
||||
|
|
|
@ -43,16 +43,21 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin, tai
|
|||
"$routeParams",
|
||||
"$q",
|
||||
"$location",
|
||||
"$log"
|
||||
"$log",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @log) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @log, @appTitle) ->
|
||||
@.attachmentsUrlName = "issues/attachments"
|
||||
|
||||
@scope.issueRef = @params.issueref
|
||||
@scope.sectionName = "Issue Details"
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set(@scope.issue.subject + " - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -45,15 +45,20 @@ class IssuesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$location"
|
||||
"$location",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @appTitle) ->
|
||||
@scope.sprintId = @params.id
|
||||
@scope.sectionName = "Issues"
|
||||
@scope.filters = {}
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Issues - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -43,15 +43,19 @@ class KanbanController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$tgLocation"
|
||||
"$tgLocation",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @appTitle) ->
|
||||
_.bindAll(@)
|
||||
|
||||
@scope.sectionName = "Kanban"
|
||||
|
||||
promise = @.loadInitialData()
|
||||
promise.then () =>
|
||||
@appTitle.set("Kanban - " + @scope.project.name)
|
||||
|
||||
promise.then null, =>
|
||||
console.log "FAIL"
|
||||
|
||||
|
|
|
@ -12,9 +12,11 @@ class ProjectNavController extends taiga.Controller
|
|||
module.controller("ProjectNavController", ProjectNavController)
|
||||
|
||||
class ProjectsController extends taiga.Controller
|
||||
@.$inject = ["$scope", "$tgResources", "$rootScope", "$tgNavUrls", "$tgAuth", "$location"]
|
||||
@.$inject = ["$scope", "$tgResources", "$rootScope", "$tgNavUrls", "$tgAuth", "$location", "$appTitle"]
|
||||
|
||||
constructor: (@scope, @rs, @rootscope, @navurls, $auth, $location, appTitle) ->
|
||||
appTitle.set("Projects")
|
||||
|
||||
constructor: (@scope, @rs, @rootscope, @navurls, $auth, $location) ->
|
||||
if !$auth.isAuthenticated()
|
||||
$location.path("/login")
|
||||
|
||||
|
@ -45,11 +47,13 @@ class ProjectsController extends taiga.Controller
|
|||
module.controller("ProjectsController", ProjectsController)
|
||||
|
||||
class ProjectController extends taiga.Controller
|
||||
@.$inject = ["$scope", "$tgResources", "$tgRepo", "$routeParams", "$q", "$rootScope"]
|
||||
@.$inject = ["$scope", "$tgResources", "$tgRepo", "$routeParams", "$q", "$rootScope", "$appTitle"]
|
||||
|
||||
constructor: (@scope, @rs, @repo, @params, @q, @rootscope) ->
|
||||
constructor: (@scope, @rs, @repo, @params, @q, @rootscope, @appTitle) ->
|
||||
@scope.hideMenu = false
|
||||
@.loadInitialData()
|
||||
.then () =>
|
||||
@appTitle.set(@scope.project.name)
|
||||
|
||||
loadInitialData: ->
|
||||
# Resolve project slug
|
||||
|
|
|
@ -40,13 +40,18 @@ class SearchController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q",
|
||||
"$location"
|
||||
"$location",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @repo, @rs, @params, @q, @location) ->
|
||||
constructor: (@scope, @repo, @rs, @params, @q, @location, @appTitle) ->
|
||||
@scope.sectionName = "Search"
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Search")
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -41,16 +41,21 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
"$tgConfirm",
|
||||
"$tgResources",
|
||||
"$routeParams",
|
||||
"$q"
|
||||
"$q",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @appTitle) ->
|
||||
_.bindAll(@)
|
||||
|
||||
@scope.sprintId = @params.id
|
||||
@scope.sectionName = "Taskboard"
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Taskboard - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -40,16 +40,21 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig
|
|||
"$routeParams",
|
||||
"$q",
|
||||
"$location",
|
||||
"$log"
|
||||
"$log",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @log) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @log, @appTitle) ->
|
||||
@.attachmentsUrlName = "tasks/attachments"
|
||||
|
||||
@scope.taskRef = @params.taskref
|
||||
@scope.sectionName = "Task Details"
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set(@scope.task.subject + " - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -41,16 +41,21 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin,
|
|||
"$routeParams",
|
||||
"$q",
|
||||
"$location",
|
||||
"$log"
|
||||
"$log",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @log) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @log, @appTitle) ->
|
||||
@.attachmentsUrlName = "userstories/attachments"
|
||||
|
||||
@scope.issueRef = @params.issueref
|
||||
@scope.sectionName = "User Story Details"
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set(@scope.us.subject + " - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -43,10 +43,11 @@ class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig
|
|||
"$q",
|
||||
"$location",
|
||||
"$filter",
|
||||
"$log"
|
||||
"$log",
|
||||
"$appTitle"
|
||||
]
|
||||
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @filter, @log) ->
|
||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @filter, @log, @appTitle) ->
|
||||
@.attachmentsUrlName = "wiki/attachments"
|
||||
|
||||
@scope.projectSlug = @params.pslug
|
||||
|
@ -54,6 +55,10 @@ class WikiDetailController extends mixOf(taiga.Controller, taiga.PageMixin, taig
|
|||
@scope.sectionName = "Wiki"
|
||||
|
||||
promise = @.loadInitialData()
|
||||
|
||||
promise.then () =>
|
||||
@appTitle.set("Wiki - " + @scope.project.name)
|
||||
|
||||
promise.then null, ->
|
||||
console.log "FAIL" #TODO
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ doctype html
|
|||
html(lang="en", ng-app="taiga")
|
||||
head
|
||||
meta(charset="utf-8")
|
||||
title= Taiga
|
||||
title Taiga
|
||||
meta(http-equiv="content-type", content="text/html; charset=utf-8")
|
||||
meta(name="description", content="Taiga Landing page")
|
||||
meta(name="keywords", content="Agile, Taiga, Management, Github")
|
||||
|
|
Loading…
Reference in New Issue