Fix the title meta when open a project detail or profile page clicking with the center button

stable
David Barragán Merino 2015-06-10 11:28:33 +02:00
parent 86d4eaad61
commit 35be3df835
2 changed files with 11 additions and 7 deletions

View File

@ -27,11 +27,13 @@ class ProfileController
@._setMeta(@.user)
_setMeta: (user) ->
title = @translate.instant("USER.PROFILE.PAGE_TITLE", {
ctx = {
userFullName: user.get("full_name_display"),
userUsername: user.get("username")
})
description = user.get("bio")
@appMetaService.setAll(title, description)
}
@translate("USER.PROFILE.PAGE_TITLE", ctx).then (title) =>
description = user.get("bio")
@appMetaService.setAll(title, description)
angular.module("taigaProfile").controller("Profile", ProfileController)

View File

@ -22,8 +22,10 @@ class ProjectController
@xhrError.response(xhr)
_setMeta: (project)->
title = @translate.instant("PROJECT.PAGE_TITLE", {projectName: project.get("name")})
description = project.get("description")
@appMetaService.setAll(title, description)
ctx = {projectName: project.get("name")}
title = @translate("PROJECT.PAGE_TITLE", ctx).then (title) =>
description = project.get("description")
@appMetaService.setAll(title, description)
angular.module("taigaProjects").controller("Project", ProjectController)