Fix the title meta when open a project detail or profile page clicking with the center button
parent
86d4eaad61
commit
35be3df835
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue