branch develop updated (3884890 -> b84131a)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository echobase. See http://git.codelutin.com/echobase.git from 3884890 fix site url new b84131a fixes #6279: Les liens sur la documentation ne sont pas corrects The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit b84131ad60d1d501718e977af68c344434c97ea9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Dec 9 19:40:10 2014 +0100 fixes #6279: Les liens sur la documentation ne sont pas corrects Summary of changes: .../echobase/config/EchoBaseConfiguration.java | 25 ++++++++++++++++++---- .../config/EchoBaseConfigurationOption.java | 2 +- .../echobase/ui/actions/EchoBaseActionSupport.java | 9 +------- echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository echobase. See http://git.codelutin.com/echobase.git commit b84131ad60d1d501718e977af68c344434c97ea9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Dec 9 19:40:10 2014 +0100 fixes #6279: Les liens sur la documentation ne sont pas corrects --- .../echobase/config/EchoBaseConfiguration.java | 25 ++++++++++++++++++---- .../config/EchoBaseConfigurationOption.java | 2 +- .../echobase/ui/actions/EchoBaseActionSupport.java | 9 +------- echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java b/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java index a2fbf0c..44c5053 100644 --- a/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java +++ b/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfiguration.java @@ -38,6 +38,7 @@ import java.net.URL; import java.util.Collections; import java.util.Comparator; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Properties; @@ -238,8 +239,24 @@ public class EchoBaseConfiguration { } public URL getDocumentationUrl() { - URL result = applicationConfig.getOptionAsURL( - EchoBaseConfigurationOption.DOCUMENTATION_URL.key); + URL result = applicationConfig.getOptionAsURL(EchoBaseConfigurationOption.DOCUMENTATION_URL.key); + return result; + } + + public String getDocumentationUrl(Locale locale) { + String result = getDocumentationUrl().toString(); + if (!result.endsWith("/")) { + result += "/"; + } + Version version = getApplicationVersion(); + if (version.isSnapshot()) { + result += "develop/"; + } else { + result += version + "/"; + } + if (Locale.ENGLISH.getLanguage().equals(locale.getLanguage())) { + result += "en/"; + } return result; } @@ -300,12 +317,12 @@ public class EchoBaseConfiguration { return jdbcUrl; } - public String getLizmapUrl(){ + public String getLizmapUrl() { String url = applicationConfig.getOption(EchoBaseConfigurationOption.LIZMAP_URL.key); return url; } - public String getLizmapRepository(){ + public String getLizmapRepository() { String repository = applicationConfig.getOption(EchoBaseConfigurationOption.LIZMAP_REPOSITORY.key); return repository; } diff --git a/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java b/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java index 2dc93f8..c864942 100644 --- a/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java +++ b/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java @@ -89,7 +89,7 @@ public enum EchoBaseConfigurationOption implements ConfigOptionDef { File.class), DOCUMENTATION_URL("echobase.documentationUrl", n("echobase.config.documentationUrl.description"), - "http://doc.codelutin.com/echobase", + "http://echobase.codelutin.com/v/", URL.class), QGIS_TEMPLATE("echobase.qgis.template.file", n("echobase.config.qgis.template.file.description"), diff --git a/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java b/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java index 663be75..2cce893 100644 --- a/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java +++ b/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/EchoBaseActionSupport.java @@ -54,7 +54,6 @@ public class EchoBaseActionSupport extends BaseAction { return service; } - public String formatDate(Date date) { String result = dateFormat.format(date); return result; @@ -83,13 +82,7 @@ public class EchoBaseActionSupport extends BaseAction { public String getDocumentation(String page, String anchor) { Locale locale = getLocale(); - String result = getEchoBaseApplicationContext().getConfiguration().getDocumentationUrl().toString(); - if (!result.endsWith("/")) { - result += "/"; - } - if (Locale.ENGLISH.getLanguage().equals(locale.getLanguage())) { - result += "en/"; - } + String result = getEchoBaseApplicationContext().getConfiguration().getDocumentationUrl(locale); result += page; if (StringUtils.isNotBlank(anchor)) { result += "#" + anchor; diff --git a/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp b/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp index 8e7fe91..29034d0 100644 --- a/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp +++ b/echobase-ui/src/main/webapp/WEB-INF/jsp/home.jsp @@ -45,7 +45,7 @@ </s:a> </li> <li> - <s:a href="http://forge.codelutin.com/projects/echobase/files" target='#doc'> + <s:a href="https://forge.codelutin.com/projects/echobase/files" target='#doc'> <s:text name="echobase.info.downloadFiles"/> </s:a> </li> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm