From fcec6df4d2ae31e12e3d2d41a2050a51efed9e88 Mon Sep 17 00:00:00 2001 From: Florian Haas Date: Tue, 21 Nov 2017 09:51:53 +0100 Subject: [PATCH] Make support URL configurable In self-hosted environments, users may want to point to an internal website or Wiki for Taiga support. - Add a configuration option named "supportUrl", akin to privacyPolicyUrl and termsOfServiceUrl. - Set its default to https://tree.taiga.io/support/ to mirror the previous behavior. Fixes #1389. --- app/modules/navigation-bar/navigation-bar.directive.coffee | 1 + app/modules/navigation-bar/navigation-bar.jade | 2 +- conf/conf.example.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/modules/navigation-bar/navigation-bar.directive.coffee b/app/modules/navigation-bar/navigation-bar.directive.coffee index 78632ad4..5aaf354c 100644 --- a/app/modules/navigation-bar/navigation-bar.directive.coffee +++ b/app/modules/navigation-bar/navigation-bar.directive.coffee @@ -26,6 +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.login = -> nextUrl = encodeURIComponent(locationService.url()) diff --git a/app/modules/navigation-bar/navigation-bar.jade b/app/modules/navigation-bar/navigation-bar.jade index 3ba56d0f..f424e36c 100644 --- a/app/modules/navigation-bar/navigation-bar.jade +++ b/app/modules/navigation-bar/navigation-bar.jade @@ -16,7 +16,7 @@ nav.navbar(ng-if="vm.isEnabledHeader") include ../../svg/logo.svg a( - href="https://tree.taiga.io/support/", + href="{{ vm.supportUrl }}", target="_blank", title="{{'PROJECT.NAVIGATION.HELP_TITLE' | translate}}", translate="PROJECT.NAVIGATION.HELP" diff --git a/conf/conf.example.json b/conf/conf.example.json index 2412774b..c666149f 100644 --- a/conf/conf.example.json +++ b/conf/conf.example.json @@ -11,6 +11,7 @@ "defaultTheme": "taiga", "publicRegisterEnabled": true, "feedbackEnabled": true, + "supportUrl": "https://tree.taiga.io/support", "privacyPolicyUrl": null, "termsOfServiceUrl": null, "maxUploadFileSize": null,