Add config option to link to an imprint

pull/1/head
yflory 5 years ago
parent cbe407084d
commit e8b905282a

@ -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'),

@ -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

Loading…
Cancel
Save