This is an automated email from the git hooks/post-receive script. New commit to branch feature/41_mentions_legales in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 015f52f090f72784f913c39d46f6b6c9af403e36 Author: Samuel Maisonneuve <maisonneuve@codelutin.com> Date: Wed Sep 27 14:48:51 2017 +0200 Ajoute une page de mentions légales par défaut et déplace toutes les données à customiser dans un répertoire spécifique refs #41 --- .../main/web/{home/en.html => customData/home-en.html} | 4 ++-- .../main/web/{home/fr.html => customData/home-fr.html} | 4 ++-- .../src/main/web/customData/legalNotices-en.html | 14 ++++++++++++++ .../src/main/web/customData/legalNotices-fr.html | 13 +++++++++++++ .../src/main/web/{home => customData}/lutin.png | Bin .../src/main/web/{home => customData}/style.css | 0 .../web/tag/{Home.tag.html => ContentLoader.tag.html} | 17 +++++++++++------ pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html | 17 +++++++++++------ .../src/main/web/tag/PollenFooter.tag.html | 2 +- pollen-ui-riot-js/webpack.config.js | 2 +- 10 files changed, 55 insertions(+), 18 deletions(-) diff --git a/pollen-ui-riot-js/src/main/web/home/en.html b/pollen-ui-riot-js/src/main/web/customData/home-en.html similarity index 91% rename from pollen-ui-riot-js/src/main/web/home/en.html rename to pollen-ui-riot-js/src/main/web/customData/home-en.html index 249666b3..97a8af48 100644 --- a/pollen-ui-riot-js/src/main/web/home/en.html +++ b/pollen-ui-riot-js/src/main/web/customData/home-en.html @@ -19,7 +19,7 @@ #L% --> -<link href="./home/style.css" rel="stylesheet" type="text/css"/> +<link href="./customData/style.css" rel="stylesheet" type="text/css"/> <div class="home-container"> <div class="wrapper"> @@ -30,7 +30,7 @@ </div> <div class="c-alert c-alert--info edit"> <i class="fa fa-info-circle fa-2x" aria-hidden="true"></i> - You can modify this page to edit file <code class="c-code">/home/en.hml</code> + You can modify this page to edit file <code class="c-code">/customData/home-en.hml</code> </div> </div> </div> diff --git a/pollen-ui-riot-js/src/main/web/home/fr.html b/pollen-ui-riot-js/src/main/web/customData/home-fr.html similarity index 90% rename from pollen-ui-riot-js/src/main/web/home/fr.html rename to pollen-ui-riot-js/src/main/web/customData/home-fr.html index 65701922..f290c034 100644 --- a/pollen-ui-riot-js/src/main/web/home/fr.html +++ b/pollen-ui-riot-js/src/main/web/customData/home-fr.html @@ -19,7 +19,7 @@ #L% --> -<link href="./home/style.css" rel="stylesheet" type="text/css"/> +<link href="./customData/style.css" rel="stylesheet" type="text/css"/> <div class="home-container"> <div class="wrapper"> @@ -30,7 +30,7 @@ </div> <div class="c-alert c-alert--info edit"> <i class="fa fa-info-circle fa-2x" aria-hidden="true"></i> - Vous pouvez modifier cette page en éditant le fichier <code class="c-code">/home/fr.hml</code> + Vous pouvez modifier cette page en éditant le fichier <code class="c-code">/customData/home-fr.hml</code> </div> </div> </div> diff --git a/pollen-ui-riot-js/src/main/web/customData/legalNotices-en.html b/pollen-ui-riot-js/src/main/web/customData/legalNotices-en.html new file mode 100644 index 00000000..35899e20 --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/customData/legalNotices-en.html @@ -0,0 +1,14 @@ +<link href="./customData/style.css" rel="stylesheet" type="text/css"/> + +<h1>Legal Notices</h1> + +<div class="main-container wrapper"> + + <p>You should inform users about your legal notices.</p> + + <div class="c-alert c-alert--info edit"> + <i class="fa fa-info-circle fa-2x" aria-hidden="true"></i> + + To do so, modify this page by editing <code class="c-code">/customData/legalNotices-en.hml</code> + </div> +</div> diff --git a/pollen-ui-riot-js/src/main/web/customData/legalNotices-fr.html b/pollen-ui-riot-js/src/main/web/customData/legalNotices-fr.html new file mode 100644 index 00000000..f0a93962 --- /dev/null +++ b/pollen-ui-riot-js/src/main/web/customData/legalNotices-fr.html @@ -0,0 +1,13 @@ +<link href="./customData/style.css" rel="stylesheet" type="text/css"/> + +<h1>Mentions légales</h1> + +<div class="main-container wrapper"> + + <p>Cette page a pour objectif d'informer les utilisateurs quant à vos mentions légales.</p> + + <div class="c-alert c-alert--info edit"> + <i class="fa fa-info-circle fa-2x" aria-hidden="true"></i> + Pour l'éditer, modifier le fichier <code class="c-code">/customData/legalNotices-fr.hml</code> + </div> +</div> diff --git a/pollen-ui-riot-js/src/main/web/home/lutin.png b/pollen-ui-riot-js/src/main/web/customData/lutin.png similarity index 100% rename from pollen-ui-riot-js/src/main/web/home/lutin.png rename to pollen-ui-riot-js/src/main/web/customData/lutin.png diff --git a/pollen-ui-riot-js/src/main/web/home/style.css b/pollen-ui-riot-js/src/main/web/customData/style.css similarity index 100% rename from pollen-ui-riot-js/src/main/web/home/style.css rename to pollen-ui-riot-js/src/main/web/customData/style.css diff --git a/pollen-ui-riot-js/src/main/web/tag/Home.tag.html b/pollen-ui-riot-js/src/main/web/tag/ContentLoader.tag.html similarity index 80% rename from pollen-ui-riot-js/src/main/web/tag/Home.tag.html rename to pollen-ui-riot-js/src/main/web/tag/ContentLoader.tag.html index 9ab3d0f9..ad215974 100644 --- a/pollen-ui-riot-js/src/main/web/tag/Home.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/ContentLoader.tag.html @@ -20,15 +20,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% */ -<Home> +<ContentLoader> <div ref="container"> </div> <script type="es6"> - let session = require("../js/Session"); - this.updateContent = () => { - fetch("/home/" + session.locale + ".html").then(response => { + let session = require("../js/Session"); + + let path = this.opts.path; + if (typeof path === "function") { + path = path(session.locale); + } + + fetch(path).then(response => { return response.text(); }) .then(content => { @@ -38,6 +43,6 @@ this.on("mount", this.updateContent); this.listen("locale", this.updateContent); - + </script> -</Home> +</ContentLoader> diff --git a/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html b/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html index 5961ad66..cfb3885c 100644 --- a/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/Pollen.tag.html @@ -29,7 +29,7 @@ require("./SignIn.tag.html"); require("./SignInAction.tag.js"); require("./SignUp.tag.html"); require("./SignCheck.tag.html"); -require("./Home.tag.html"); +require("./ContentLoader.tag.html"); require("./LegalNotices.tag.html"); require("./PageChanged.tag.js"); require("./FilterLoginProvider.tag.js"); @@ -73,16 +73,21 @@ require("./popup/GtuChangeModal.tag.html"); <route path=""> <FilterLoginProvider/> <Authorization connected-if-required="true"> - <Home/> + <ContentLoader path={locale => '/customData/home-${locale}.html'}/> </Authorization> </route> - - <route path="privacy"> <FilterLoginProvider/> - <Authorization connected-if-required="true"> - <Privacy/> + <Authorization> + <Privacy/> + </Authorization> + </route> + + <route path="legalNotices"> + <FilterLoginProvider/> + <Authorization> + <ContentLoader path={locale => '/customData/legalNotices-${locale}.html'}/> </Authorization> </route> diff --git a/pollen-ui-riot-js/src/main/web/tag/PollenFooter.tag.html b/pollen-ui-riot-js/src/main/web/tag/PollenFooter.tag.html index c848bc11..2d1ebb7b 100644 --- a/pollen-ui-riot-js/src/main/web/tag/PollenFooter.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/PollenFooter.tag.html @@ -29,7 +29,7 @@ <a href="http://www.gnu.org/licenses/agpl.html">{__.license}</a> <a if={session.isGtu} href="{session.configuration.endPoint}/v1/gtu" target="_blank">{__.gtu}</a> <a href="http://www.codelutin.com/" target="_blank">Code Lutin</a> - <a href="http://codelutin.page.nuiton.org/pollen-saas/legalNotices-{session.locale}.html" target="_blank">{__.legalNotices}</a> + <a href="#legalNotices">{__.legalNotices}</a> <a if={session.configuration.piwikUrl} href="#privacy">{__.privacy}</a> </div> diff --git a/pollen-ui-riot-js/webpack.config.js b/pollen-ui-riot-js/webpack.config.js index 5ebf4111..9c2a76de 100644 --- a/pollen-ui-riot-js/webpack.config.js +++ b/pollen-ui-riot-js/webpack.config.js @@ -38,7 +38,7 @@ module.exports = { }}, {from: "src/main/web/index.html"}, {from: "src/main/web/help", to: "help"}, - {from: "src/main/web/home", to: "home"}, + {from: "src/main/web/customData", to: "customData"}, {from: "src/main/web/robots.txt"}, {from: "src/main/web/img", to: "img"}, {from: "src/main/web/css", to: "css"}, -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.