From e8b905282a2cde826ad9100dcad6b59a50c70e8b Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 20 Jan 2020 14:53:02 +0100 Subject: [PATCH] Add config option to link to an imprint --- customize.dist/pages.js | 6 +++++- www/common/application_config_internal.js | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/customize.dist/pages.js b/customize.dist/pages.js index a7fcd9441..77f69652d 100644 --- a/customize.dist/pages.js +++ b/customize.dist/pages.js @@ -1,9 +1,10 @@ define([ '/common/hyperscript.js', '/common/common-language.js', + '/customize/application_config.js', '/customize/messages.js', 'jquery', -], function (h, Language, Msg, $) { +], function (h, Language, AppConfig, Msg, $) { var Pages = {}; Pages.setHTML = function (e, html) { @@ -58,6 +59,8 @@ define([ return h('a', attrs, text); }; + var imprintUrl = AppConfig.imprint && (typeof(AppConfig.imprint) === "boolean" ? + '/imprint.html' : AppConfig.imprint); Pages.infopageFooter = function () { return h('footer', [ h('div.container', [ @@ -94,6 +97,7 @@ define([ footerCol('footer_legal', [ footLink('/terms.html', 'footer_tos'), footLink('/privacy.html', 'privacy'), + AppConfig.imprint ? footLink(imprintUrl, 'imprint') : undefined, ]), /*footerCol('footer_contact', [ footLink('https://riot.im/app/#/room/#cryptpad:matrix.org', null, 'Chat'), diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index 900a9ec28..ab573ae70 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -32,6 +32,13 @@ define(function() { */ //config.availableLanguages = ['en', 'fr', 'de']; + /* You can display a link to the imprint (legal notice) of your website in the static pages + * footer. To do so, you can either set the following value to `true` and create an imprint.html page + * in the `customize` directory. You can also set it to an absolute URL if your imprint page already exists. + */ + config.imprint = false; + // config.imprint = true; + // config.imprint = 'https://xwiki.com/en/company/legal-notice'; /* Cryptpad apps use a common API to display notifications to users * by default, notifications are hidden after 5 seconds