version number visible
This commit is contained in:
14
.classpath
14
.classpath
@ -1,17 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" output="bin/main" path="src/jooq/java">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_scope" value="main"/>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="gradle_scope" value="main"/>
|
<attribute name="gradle_scope" value="main"/>
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" output="bin/main" path="src/jooq/java">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="gradle_scope" value="main"/>
|
||||||
|
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
|
<classpathentry kind="src" path="src/main/webapp"/>
|
||||||
<classpathentry kind="src" output="bin/main" path="src/main/resources">
|
<classpathentry kind="src" output="bin/main" path="src/main/resources">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="gradle_scope" value="main"/>
|
<attribute name="gradle_scope" value="main"/>
|
||||||
@ -36,6 +37,5 @@
|
|||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" path="src/main/webapp"/>
|
|
||||||
<classpathentry kind="output" path="bin/default"/>
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/jooq/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="src/jooq/java"/>
|
||||||
|
|
||||||
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
|
<wb-resource deploy-path="/" source-path="src/main/webapp"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/jooq/java"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/webapp"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/webapp"/>
|
||||||
|
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
@ -22,7 +22,7 @@ apply plugin: 'eclipse'
|
|||||||
apply plugin: 'nu.studer.jooq'
|
apply plugin: 'nu.studer.jooq'
|
||||||
|
|
||||||
group = 'jottyfan'
|
group = 'jottyfan'
|
||||||
version = '1.1.2'
|
version = '1.1.3'
|
||||||
|
|
||||||
description = """timetrack"""
|
description = """timetrack"""
|
||||||
|
|
||||||
@ -108,6 +108,9 @@ jooq {
|
|||||||
|
|
||||||
war {
|
war {
|
||||||
archiveName 'timetrack.war'
|
archiveName 'timetrack.war'
|
||||||
|
manifest {
|
||||||
|
attributes('Implementation-Version': project.version)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// removes the task dependency from compileJava to generateTimetrackJooqSchemaSource
|
// removes the task dependency from compileJava to generateTimetrackJooqSchemaSource
|
||||||
project.tasks.getByName('compileJava').dependsOn -= 'generateTimetrackJooqSchemaSource'
|
project.tasks.getByName('compileJava').dependsOn -= 'generateTimetrackJooqSchemaSource'
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package de.jottyfan.timetrack.modules;
|
package de.jottyfan.timetrack.modules;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.faces.application.FacesMessage;
|
import javax.faces.application.FacesMessage;
|
||||||
import javax.faces.context.FacesContext;
|
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
|
* @return the secretNew1
|
||||||
*/
|
*/
|
||||||
@ -67,8 +89,7 @@ public class SessionControl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param secretNew1
|
* @param secretNew1 the secretNew1 to set
|
||||||
* the secretNew1 to set
|
|
||||||
*/
|
*/
|
||||||
public void setSecretNew1(String secretNew1) {
|
public void setSecretNew1(String secretNew1) {
|
||||||
this.secretNew1 = secretNew1;
|
this.secretNew1 = secretNew1;
|
||||||
@ -82,8 +103,7 @@ public class SessionControl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param secretNew2
|
* @param secretNew2 the secretNew2 to set
|
||||||
* the secretNew2 to set
|
|
||||||
*/
|
*/
|
||||||
public void setSecretNew2(String secretNew2) {
|
public void setSecretNew2(String secretNew2) {
|
||||||
this.secretNew2 = secretNew2;
|
this.secretNew2 = secretNew2;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:my="http://xmlns.jcp.org/jsf/composite/my" xmlns:b="http://bootsfaces.net/ui">
|
||||||
xmlns:my="http://xmlns.jcp.org/jsf/composite/my" xmlns:b="http://bootsfaces.net/ui">
|
|
||||||
<h:head>
|
<h:head>
|
||||||
</h:head>
|
</h:head>
|
||||||
<h:body>
|
<h:body>
|
||||||
@ -37,31 +36,31 @@
|
|||||||
</b:panel>
|
</b:panel>
|
||||||
</b:accordion>
|
</b:accordion>
|
||||||
</b:panel>
|
</b:panel>
|
||||||
<b:panel title="Login" rendered="#{sessionBean.hasNoLogin}" styleClass="loginpanel">
|
<b:panel title="Anmeldung" collapsible="false" styleClass="loginpanel" rendered="#{sessionBean.hasNoLogin}">
|
||||||
<b:form>
|
<b:form>
|
||||||
<b:selectOneMenu value="#{sessionBean.username}">
|
<b:selectOneMenu value="#{sessionBean.username}">
|
||||||
<f:facet name="prepend">
|
<f:facet name="prepend">
|
||||||
<h:outputText value="Username" />
|
<h:outputText value="Benutzer" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
<f:selectItem itemValue="henkej" itemLabel="Jörg Henke" />
|
<f:selectItem itemValue="henkej" itemLabel="Jörg Henke" />
|
||||||
<f:selectItem itemValue="piontekm" itemLabel="Michael Piontek" />
|
|
||||||
</b:selectOneMenu>
|
</b:selectOneMenu>
|
||||||
<b:inputSecret value="#{sessionBean.secret}">
|
<b:inputSecret value="#{sessionBean.secret}">
|
||||||
<f:facet name="prepend">
|
<f:facet name="prepend">
|
||||||
<h:outputText value="Passwort" />
|
<h:outputText value="Passwort" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
</b:inputSecret>
|
</b:inputSecret>
|
||||||
<b:commandButton action="#{sessionControl.doLogin}" value="Login" look="primary" />
|
<h:panelGrid columns="2" columnClasses="left,right" style="width: 100%">
|
||||||
|
<h:outputText value="Version: #{sessionControl.version}" styleClass="version" />
|
||||||
|
<b:commandButton action="#{sessionControl.doLogin}" value="Anmelden" look="primary" style="width: 100%" />
|
||||||
|
</h:panelGrid>
|
||||||
</b:form>
|
</b:form>
|
||||||
</b:panel>
|
</b:panel>
|
||||||
</ui:define>
|
</ui:define>
|
||||||
<ui:define name="navigation">
|
<ui:define name="navigation">
|
||||||
<b:form rendered="#{sessionBean.hasLogin}">
|
<b:form rendered="#{sessionBean.hasLogin}">
|
||||||
<b:buttonGroup>
|
<b:buttonGroup>
|
||||||
<b:commandButton action="#{noteControl.toList}" value="#{noteControl.amount} Notizen verwalten" look="primary" iconAwesome="comments-o"
|
<b:commandButton action="#{noteControl.toList}" value="#{noteControl.amount} Notizen verwalten" look="primary" iconAwesome="comments-o" rendered="#{sessionBean.hasPrivilege('write_note')}" />
|
||||||
rendered="#{sessionBean.hasPrivilege('write_note')}" />
|
<b:commandButton action="#{contactControl.toList}" value="#{contactControl.amount} Kontakte verwalten" look="primary" iconAwesome="group" rendered="#{sessionBean.hasPrivilege('write_contact')}" />
|
||||||
<b:commandButton action="#{contactControl.toList}" value="#{contactControl.amount} Kontakte verwalten" look="primary" iconAwesome="group"
|
|
||||||
rendered="#{sessionBean.hasPrivilege('write_contact')}" />
|
|
||||||
<b:commandButton action="#{doneControl.toList}" value="Arbeitszeit verwalten" look="primary" iconAwesome="clock-o" rendered="#{sessionBean.hasPrivilege('write_done')}" />
|
<b:commandButton action="#{doneControl.toList}" value="Arbeitszeit verwalten" look="primary" iconAwesome="clock-o" rendered="#{sessionBean.hasPrivilege('write_done')}" />
|
||||||
<b:commandButton action="#{doneControl.toRead}" value="Arbeitszeiten anzeigen" look="primary" iconAwesome="clock-o" rendered="#{sessionBean.hasPrivilege('read_done')}" />
|
<b:commandButton action="#{doneControl.toRead}" value="Arbeitszeiten anzeigen" look="primary" iconAwesome="clock-o" rendered="#{sessionBean.hasPrivilege('read_done')}" />
|
||||||
<b:commandButton action="#{sessionControl.doLogout}" value="abmelden" look="danger" iconAwesome="sign-out" />
|
<b:commandButton action="#{sessionControl.doLogout}" value="abmelden" look="danger" iconAwesome="sign-out" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:my="http://xmlns.jcp.org/jsf/composite/my" xmlns:b="http://bootsfaces.net/ui">
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:my="http://xmlns.jcp.org/jsf/composite/my" xmlns:b="http://bootsfaces.net/ui" style="height: 100%; width: 100%">
|
||||||
<h:head>
|
<h:head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
</h:head>
|
</h:head>
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<b:messages />
|
<b:messages />
|
||||||
</div>
|
</div>
|
||||||
<div class="body">
|
<div class="main">
|
||||||
<ui:insert name="main" />
|
<ui:insert name="main" />
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
|
@ -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 {
|
.emph {
|
||||||
border-radius: 3px !important;
|
border-radius: 3px !important;
|
||||||
border: 1px solid #3070b0 !important;
|
border: 1px solid #3070b0 !important;
|
||||||
@ -23,11 +36,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.successWell {
|
.successWell {
|
||||||
background-image: linear-gradient(to bottom, #ceeaca 0%, #f7fff7 100%) !important;
|
background-image: linear-gradient(to bottom, #ceeaca 0%, #f7fff7 100%)
|
||||||
|
!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dangerWell {
|
.dangerWell {
|
||||||
background-image: linear-gradient(to bottom, #eacaca 0%, #fff7f7 100%) !important;
|
background-image: linear-gradient(to bottom, #eacaca 0%, #fff7f7 100%)
|
||||||
|
!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.WP2 {
|
.WP2 {
|
||||||
@ -45,3 +60,15 @@
|
|||||||
background-color: #e396ff !important;
|
background-color: #e396ff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
font-size: small;
|
||||||
|
color: silver;
|
||||||
|
}
|
Reference in New Issue
Block a user