diff --git a/.classpath b/.classpath index 83f7853..194ebe5 100644 --- a/.classpath +++ b/.classpath @@ -1,17 +1,18 @@ - - - - - - + + + + + + + @@ -36,6 +37,5 @@ - diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 7230246..f2b9a59 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -11,6 +11,10 @@ + + + + diff --git a/build.gradle b/build.gradle index 87d0947..ab221b9 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ apply plugin: 'eclipse' apply plugin: 'nu.studer.jooq' group = 'jottyfan' -version = '1.1.2' +version = '1.1.3' description = """timetrack""" @@ -108,6 +108,9 @@ jooq { war { archiveName 'timetrack.war' + manifest { + attributes('Implementation-Version': project.version) + } } // removes the task dependency from compileJava to generateTimetrackJooqSchemaSource project.tasks.getByName('compileJava').dependsOn -= 'generateTimetrackJooqSchemaSource' diff --git a/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java b/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java index 5eee78f..f4a3359 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java +++ b/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java @@ -1,5 +1,8 @@ package de.jottyfan.timetrack.modules; +import java.io.InputStream; +import java.util.Properties; + import javax.enterprise.context.RequestScoped; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; @@ -59,6 +62,25 @@ public class SessionControl { } } + /** + * get the version from the mainfest file + * + * @return the version + */ + public String getVersion() { + FacesContext facesContext = FacesContext.getCurrentInstance(); + try (InputStream is = facesContext.getExternalContext().getResourceAsStream("META-INF/MANIFEST.MF")){ + // from servletcontext + Properties attributes = new Properties(); + attributes.load(is); + return attributes.getProperty("Implementation-Version", "no Implementation-Version attribute found in MANIFEST"); + } catch (Exception e) { + FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "error on loading the version from the Manifest file", e.getMessage()); + FacesContext.getCurrentInstance().addMessage(null, msg); + return "?"; + } + } + /** * @return the secretNew1 */ @@ -67,8 +89,7 @@ public class SessionControl { } /** - * @param secretNew1 - * the secretNew1 to set + * @param secretNew1 the secretNew1 to set */ public void setSecretNew1(String secretNew1) { this.secretNew1 = secretNew1; @@ -82,8 +103,7 @@ public class SessionControl { } /** - * @param secretNew2 - * the secretNew2 to set + * @param secretNew2 the secretNew2 to set */ public void setSecretNew2(String secretNew2) { this.secretNew2 = secretNew2; diff --git a/src/main/webapp/pages/start.xhtml b/src/main/webapp/pages/start.xhtml index 6fd80ad..a0f67e5 100644 --- a/src/main/webapp/pages/start.xhtml +++ b/src/main/webapp/pages/start.xhtml @@ -1,73 +1,72 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/pages/template.xhtml b/src/main/webapp/pages/template.xhtml index e7ae228..a1a6d0c 100644 --- a/src/main/webapp/pages/template.xhtml +++ b/src/main/webapp/pages/template.xhtml @@ -1,24 +1,24 @@ - + - + - - -
-
- -
-
- -
-
- -
- -
+ + +
+
+ +
+
+ +
+
+ +
+ +
diff --git a/src/main/webapp/resources/css/style.css b/src/main/webapp/resources/css/style.css index 71ad53e..1bd956f 100644 --- a/src/main/webapp/resources/css/style.css +++ b/src/main/webapp/resources/css/style.css @@ -1,3 +1,16 @@ +.body { + height: 100%; + width: 100%; + overflow: auto; +} + +.page { + height: 100%; + width: 100%; + background-image: linear-gradient(to bottom, #fff 0%, #ccc 20%) + !important; +} + .emph { border-radius: 3px !important; border: 1px solid #3070b0 !important; @@ -23,11 +36,13 @@ } .successWell { - background-image: linear-gradient(to bottom, #ceeaca 0%, #f7fff7 100%) !important; + background-image: linear-gradient(to bottom, #ceeaca 0%, #f7fff7 100%) + !important; } .dangerWell { - background-image: linear-gradient(to bottom, #eacaca 0%, #fff7f7 100%) !important; + background-image: linear-gradient(to bottom, #eacaca 0%, #fff7f7 100%) + !important; } .WP2 { @@ -45,3 +60,15 @@ background-color: #e396ff !important; } +.left { + text-align: left; +} + +.right { + text-align: right; +} + +.version { + font-size: small; + color: silver; +} \ No newline at end of file