This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository scmwebeditor. See http://git.nuiton.org/scmwebeditor.git commit a1165948222c9ad72ac3157d0125b40910f6c776 Author: Hugo PIGEON <hpigeon@codelutin.com> Date: Mon Jun 8 11:18:11 2015 +0200 Add the ScmWebEditor's version number to the bottom of the pages --- swe-ui-web/pom.xml | 14 +++++++++++++- .../org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java | 4 ++++ .../scmwebeditor/uiweb/ScmWebEditorConfigOption.java | 1 + .../uiweb/actions/AbstractScmWebEditorAction.java | 3 +++ swe-ui-web/src/main/resources/scmwebeditor.properties | 1 + .../src/main/webapp/WEB-INF/content/badFileRedirect.jsp | 2 +- .../src/main/webapp/WEB-INF/content/badUseRedirect.jsp | 2 +- swe-ui-web/src/main/webapp/WEB-INF/content/error.jsp | 2 +- .../src/main/webapp/WEB-INF/content/fileNotEditable.jsp | 2 +- swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp | 2 +- swe-ui-web/src/main/webapp/WEB-INF/content/logout.jsp | 2 +- .../src/main/webapp/WEB-INF/content/modificationViewer.jsp | 2 +- .../src/main/webapp/WEB-INF/content/outConnection.jsp | 2 +- .../src/main/webapp/WEB-INF/content/privateScmRedirect.jsp | 2 +- swe-ui-web/src/main/webapp/WEB-INF/content/redirect.jsp | 2 +- swe-ui-web/src/main/webapp/css/main.css | 4 ++++ 16 files changed, 36 insertions(+), 11 deletions(-) diff --git a/swe-ui-web/pom.xml b/swe-ui-web/pom.xml index b108816..0be33db 100644 --- a/swe-ui-web/pom.xml +++ b/swe-ui-web/pom.xml @@ -24,10 +24,22 @@ <resource> <directory>src/main/resources</directory> <includes> - <include>**/*</include> + <include>scmwebeditor.properties</include> + <include>struts.properties</include> + <include>nuiton-js.properties</include> + <include>META-INF/nuiton-js/*</include> </includes> <filtering>true</filtering> </resource> + <resource> + <directory>src/main/resources</directory> + <excludes> + <exclude>scmwebeditor.properties</exclude> + <exclude>struts.properties</exclude> + <exclude>nuiton-js.properties</exclude> + <exclude>META-INF/nuiton-js/*</exclude> + </excludes> + </resource> </resources> <plugins> diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java index dcb339d..21e7ce9 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfig.java @@ -99,6 +99,10 @@ public class ScmWebEditorConfig { return getConfig().getOption(ScmWebEditorConfigOption.COOKIES_PRIVATE_KEY.getKey()); } + public static String getVersion() { + return getConfig().getOption(ScmWebEditorConfigOption.VERSION.getKey()); + } + public static int getAutoSaveInterval() { String readValue = getConfig().getOption(ScmWebEditorConfigOption.AUTO_SAVE_INTERVAL.getKey()); return Integer.parseInt(readValue); diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java index 9df9acd..a775e39 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/ScmWebEditorConfigOption.java @@ -30,6 +30,7 @@ import org.nuiton.config.ConfigOptionDef; public enum ScmWebEditorConfigOption implements ConfigOptionDef { CONFIG_FILE(ApplicationConfig.CONFIG_FILE_NAME, "The file name", "scmwebeditor.properties", String.class, false, false), + VERSION("swe.version", "The version of SCMWebEditor", "", String.class, false, true), EDITABLE_FILES("swe.editableFiles", "description", "Files types that are editable", String.class, true, true), COOKIES_PRIVATE_KEY("swe.cookiePrivateKey", "Private key for cookies", null, String.class, true, true), LOCAL_REPOSITORIES_PATH("swe.localRepositoriesPath", "The path where the local repositories will be stored", "/var/local/swe", String.class, false, true), diff --git a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/AbstractScmWebEditorAction.java b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/AbstractScmWebEditorAction.java index 19e14b3..5195dbe 100644 --- a/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/AbstractScmWebEditorAction.java +++ b/swe-ui-web/src/main/java/org/nuiton/scmwebeditor/uiweb/actions/AbstractScmWebEditorAction.java @@ -32,6 +32,7 @@ import org.apache.tika.metadata.Metadata; import org.apache.tika.parser.AutoDetectParser; import org.apache.tika.sax.BodyContentHandler; import org.nuiton.scmwebeditor.uiweb.ScmSession; +import org.nuiton.scmwebeditor.uiweb.ScmWebEditorConfig; import org.nuiton.web.struts2.BaseAction; import org.xml.sax.SAXException; @@ -403,6 +404,8 @@ public abstract class AbstractScmWebEditorAction extends BaseAction implements S return getScmSession().getPassword(url); } + public String getSweVersion() { return ScmWebEditorConfig.getVersion(); } + @Override public void setServletRequest(HttpServletRequest request) { this.request = request; diff --git a/swe-ui-web/src/main/resources/scmwebeditor.properties b/swe-ui-web/src/main/resources/scmwebeditor.properties index 319f003..0f07c30 100644 --- a/swe-ui-web/src/main/resources/scmwebeditor.properties +++ b/swe-ui-web/src/main/resources/scmwebeditor.properties @@ -19,6 +19,7 @@ # <http://www.gnu.org/licenses/lgpl-3.0.html>. # #L% ### +swe.version=${project.version} swe.editableFiles=text,xml,javascript,sh,x-tex,x-java swe.cookiePrivateKey=ZvcCyhfRTVZoQz3B/IpYdw== swe.localRepositoriesPath=/var/local/swe diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/badFileRedirect.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/badFileRedirect.jsp index a396ee4..477d1b6 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/badFileRedirect.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/badFileRedirect.jsp @@ -54,6 +54,6 @@ <% } %> <s:text name="scm.clickHere"/></a>.</p> -<p>©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/badUseRedirect.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/badUseRedirect.jsp index 311ac1e..cdfd734 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/badUseRedirect.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/badUseRedirect.jsp @@ -53,6 +53,6 @@ <% } %> click this link</a>.</p> -<p>©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/error.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/error.jsp index 3832440..02fa476 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/error.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/error.jsp @@ -45,6 +45,6 @@ <p><s:text name="scm.badUsernameOrPassword"/></p> -<p>©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp index dfee9ce..ba8a75c 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/fileNotEditable.jsp @@ -53,6 +53,6 @@ <s:text name="scm.back"/> <a href="checkout.action"><s:text name="scm.homepage"/></a>. </p> -<p>©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp index f6ecaa5..c941b2e 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/imageViewer.jsp @@ -275,7 +275,7 @@ </div> </div> - <p align="right">©2004-2015 CodeLutin</p> + <p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </div> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/logout.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/logout.jsp index 7c86c4a..b980a22 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/logout.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/logout.jsp @@ -47,6 +47,6 @@ href="edit.action?address=<%=request.getAttribute("address")%>&scmType=<%=request.getAttribute("scmType")%>&selectedBranch=<%=request.getParameter("selectedBranch")%>&repositoryRoot=<%=request.getAttribute("repositoryRoot")%>"> <s:text name="scm.clickHere"/> </a>.</p> -<p>©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp index 7ffb3b5..206c38d 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/modificationViewer.jsp @@ -496,7 +496,7 @@ </div> </form> - <p align="right">©2004-2015 CodeLutin</p> + <p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </div> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp index 37c6f0e..7943348 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/outConnection.jsp @@ -155,7 +155,7 @@ --> </div> </div> -<p align="right">©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp index 7ccf0b2..119a9f1 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/privateScmRedirect.jsp @@ -81,6 +81,6 @@ <img src="struts/js/jstree/themes/classic/throbber.gif" alt="loading" class="indicator" id="loadingIndicator"/> </form> -<p>©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/WEB-INF/content/redirect.jsp b/swe-ui-web/src/main/webapp/WEB-INF/content/redirect.jsp index ae607e4..9341598 100644 --- a/swe-ui-web/src/main/webapp/WEB-INF/content/redirect.jsp +++ b/swe-ui-web/src/main/webapp/WEB-INF/content/redirect.jsp @@ -52,6 +52,6 @@ <% } %> <s:text name="scm.clickHere"/></a>.</p> -<p>©2004-2015 CodeLutin</p> +<p>SCMWebEditor <s:property value="sweVersion"/><span class="align-right">©2004-2015 CodeLutin</span></p> </body> </html> diff --git a/swe-ui-web/src/main/webapp/css/main.css b/swe-ui-web/src/main/webapp/css/main.css index e0d8d3a..e40c062 100644 --- a/swe-ui-web/src/main/webapp/css/main.css +++ b/swe-ui-web/src/main/webapp/css/main.css @@ -527,4 +527,8 @@ ul#repositoryButtons li, ul#repositoryButtonsImg li { #lastAutoSave { display: none; +} + +.align-right { + float: right; } \ No newline at end of file -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.