Display link to help page only if custom suppor url is defined

stable
Daniel García 2018-09-03 15:00:20 +02:00 committed by Alex Hermida
parent 4e14e69560
commit e17f5f2088
4 changed files with 6 additions and 5 deletions

View File

@ -23,7 +23,7 @@ DropdownUserDirective = (authService, configService, locationService,
link = (scope, el, attrs, ctrl) ->
scope.vm = {}
scope.vm.isFeedbackEnabled = configService.get("feedbackEnabled")
scope.vm.supportUrl = configService.get("supportUrl")
scope.vm.customSupportUrl = configService.get("supportUrl")
taiga.defineImmutableProperty(scope.vm, "user", () -> authService.userData)
scope.vm.logout = ->

View File

@ -49,9 +49,9 @@ div.navbar-dropdown.dropdown-user
ng-click="vm.sendFeedback()",
title="{{'PROJECT.NAVIGATION.FEEDBACK_TITLE' | translate}}",
translate="PROJECT.NAVIGATION.FEEDBACK")
li
li(ng-if="vm.customSupportUrl")
a(
href="{{ vm.supportUrl }}",
href="{{ vm.customSupportUrl }}",
target="_blank",
title="{{'PROJECT.NAVIGATION.HELP_TITLE' | translate}}",
translate="PROJECT.NAVIGATION.HELP")

View File

@ -26,7 +26,7 @@ NavigationBarDirective = (currentUserService, navigationBarService, locationServ
taiga.defineImmutableProperty(scope.vm, "isEnabledHeader", () -> navigationBarService.isEnabledHeader())
scope.vm.publicRegisterEnabled = config.get("publicRegisterEnabled")
scope.vm.supportUrl = config.get("supportUrl")
scope.vm.customSupportUrl = config.get("supportUrl")
scope.vm.login = ->
nextUrl = encodeURIComponent(locationService.url())

View File

@ -16,7 +16,8 @@ nav.navbar(ng-if="vm.isEnabledHeader")
include ../../svg/logo.svg
a(
href="{{ vm.supportUrl }}",
ng-if="vm.customSupportUrl"
href="{{ vm.customSupportUrl }}",
target="_blank",
title="{{'PROJECT.NAVIGATION.HELP_TITLE' | translate}}",
translate="PROJECT.NAVIGATION.HELP"