Mercurial > gemma
changeset 3369:33c398df5cb5
client: implement download of the user manual
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Wed, 22 May 2019 11:56:52 +0200 |
parents | 70605404f37d |
children | ac630f0f5dbf |
files | client/.env client/src/components/identify/Identify.vue client/src/store/application.js |
diffstat | 3 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/.env Wed May 22 11:00:25 2019 +0200 +++ b/client/.env Wed May 22 11:56:52 2019 +0200 @@ -12,3 +12,6 @@ VUE_APP_SECONDARY_LOGO_URL= VUE_APP_LOGO_FOR_PDF_URL= VUE_APP_SILENCE_TRANSLATIONWARNINGS = + +#Url of user manual +VUE_APP_USER_MANUAL_URL= \ No newline at end of file
--- a/client/src/components/identify/Identify.vue Wed May 22 11:00:25 2019 +0200 +++ b/client/src/components/identify/Identify.vue Wed May 22 11:56:52 2019 +0200 @@ -81,6 +81,14 @@ </span> <translate>Generated PDFs use font: </translate> <a href="http://libertine-fonts.org">LinBiolinum</a> + <div> + <translate>Download</translate> + <a + :href="userManualUrl ? userManualUrl : '#'" + :download="!!userManualUrl.length" + ><translate> User Manual</translate></a + > + </div> </div> </div> </div> @@ -138,7 +146,7 @@ name: "identify", computed: { ...mapGetters("application", ["versionStr"]), - ...mapState("application", ["showIdentify"]), + ...mapState("application", ["showIdentify", "userManualUrl"]), ...mapGetters("map", ["filteredIdentifiedFeatures"]), ...mapState("map", ["currentMeasurement"]), identifiedLabel() {
--- a/client/src/store/application.js Wed May 22 11:00:25 2019 +0200 +++ b/client/src/store/application.js Wed May 22 11:56:52 2019 +0200 @@ -19,6 +19,7 @@ // initial state const init = () => { return { + userManualUrl: process.env.VUE_APP_USER_MANUAL_URL, appTitle: process.env.VUE_APP_TITLE, secondaryLogo: process.env.VUE_APP_SECONDARY_LOGO_URL, logoForPDF: process.env.VUE_APP_LOGO_FOR_PDF_URL,