version number visible
This commit is contained in:
14
.classpath
14
.classpath
@ -1,17 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<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/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">
|
||||
<attributes>
|
||||
<attribute name="gradle_scope" value="main"/>
|
||||
@ -36,6 +37,5 @@
|
||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src/main/webapp"/>
|
||||
<classpathentry kind="output" path="bin/default"/>
|
||||
</classpath>
|
||||
|
@ -11,6 +11,10 @@
|
||||
<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="/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-module>
|
||||
|
@ -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'
|
||||
|
@ -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;
|
||||
|
@ -1,73 +1,72 @@
|
||||
<!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">
|
||||
<h:head>
|
||||
</h:head>
|
||||
<h:body>
|
||||
<ui:composition template="/pages/template.xhtml">
|
||||
<ui:define name="top">
|
||||
<b:messages />
|
||||
</ui:define>
|
||||
<ui:define name="main">
|
||||
<b:panel title="Einstellungen" collapsed="true" rendered="#{sessionBean.hasLogin}">
|
||||
<b:accordion expandedPanels="layout">
|
||||
<b:panel id="layout" title="Layout">
|
||||
<b:form>
|
||||
<b:selectOneMenu value="#{themeBean.currentTheme}">
|
||||
<f:selectItems value="#{themeBean.validThemes}" var="t" itemValue="#{t}" itemLabel="#{t}" />
|
||||
</b:selectOneMenu>
|
||||
<b:commandButton action="#{doneControl.toStart}" value="ändern" iconAwesome="pencil" look="warning" />
|
||||
</b:form>
|
||||
</b:panel>
|
||||
<b:panel id="password" title="Passwort">
|
||||
<b:form>
|
||||
<b:inputSecret value="#{sessionControl.secretNew1}" required="true" requiredMessage="Das Feld Passwort muss ausgefüllt werden.">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Passwort" />
|
||||
</f:facet>
|
||||
</b:inputSecret>
|
||||
<b:inputSecret value="#{sessionControl.secretNew2}" required="true" requiredMessage="Das Feld Passwort nochmal muss ausgefüllt werden.">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Passwort nochmal" />
|
||||
</f:facet>
|
||||
</b:inputSecret>
|
||||
<b:commandButton action="#{sessionControl.doChangePassword}" value="übernehmen" look="warning" />
|
||||
</b:form>
|
||||
</b:panel>
|
||||
</b:accordion>
|
||||
</b:panel>
|
||||
<b:panel title="Login" rendered="#{sessionBean.hasNoLogin}" styleClass="loginpanel">
|
||||
<b:form>
|
||||
<b:selectOneMenu value="#{sessionBean.username}">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Username" />
|
||||
</f:facet>
|
||||
<f:selectItem itemValue="henkej" itemLabel="Jörg Henke" />
|
||||
<f:selectItem itemValue="piontekm" itemLabel="Michael Piontek" />
|
||||
</b:selectOneMenu>
|
||||
<b:inputSecret value="#{sessionBean.secret}">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Passwort" />
|
||||
</f:facet>
|
||||
</b:inputSecret>
|
||||
<b:commandButton action="#{sessionControl.doLogin}" value="Login" look="primary" />
|
||||
</b:form>
|
||||
</b:panel>
|
||||
</ui:define>
|
||||
<ui:define name="navigation">
|
||||
<b:form rendered="#{sessionBean.hasLogin}">
|
||||
<b:buttonGroup>
|
||||
<b:commandButton action="#{noteControl.toList}" value="#{noteControl.amount} Notizen verwalten" look="primary" iconAwesome="comments-o"
|
||||
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="#{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="#{sessionControl.doLogout}" value="abmelden" look="danger" iconAwesome="sign-out" />
|
||||
</b:buttonGroup>
|
||||
</b:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
<ui:composition template="/pages/template.xhtml">
|
||||
<ui:define name="top">
|
||||
<b:messages />
|
||||
</ui:define>
|
||||
<ui:define name="main">
|
||||
<b:panel title="Einstellungen" collapsed="true" rendered="#{sessionBean.hasLogin}">
|
||||
<b:accordion expandedPanels="layout">
|
||||
<b:panel id="layout" title="Layout">
|
||||
<b:form>
|
||||
<b:selectOneMenu value="#{themeBean.currentTheme}">
|
||||
<f:selectItems value="#{themeBean.validThemes}" var="t" itemValue="#{t}" itemLabel="#{t}" />
|
||||
</b:selectOneMenu>
|
||||
<b:commandButton action="#{doneControl.toStart}" value="ändern" iconAwesome="pencil" look="warning" />
|
||||
</b:form>
|
||||
</b:panel>
|
||||
<b:panel id="password" title="Passwort">
|
||||
<b:form>
|
||||
<b:inputSecret value="#{sessionControl.secretNew1}" required="true" requiredMessage="Das Feld Passwort muss ausgefüllt werden.">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Passwort" />
|
||||
</f:facet>
|
||||
</b:inputSecret>
|
||||
<b:inputSecret value="#{sessionControl.secretNew2}" required="true" requiredMessage="Das Feld Passwort nochmal muss ausgefüllt werden.">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Passwort nochmal" />
|
||||
</f:facet>
|
||||
</b:inputSecret>
|
||||
<b:commandButton action="#{sessionControl.doChangePassword}" value="übernehmen" look="warning" />
|
||||
</b:form>
|
||||
</b:panel>
|
||||
</b:accordion>
|
||||
</b:panel>
|
||||
<b:panel title="Anmeldung" collapsible="false" styleClass="loginpanel" rendered="#{sessionBean.hasNoLogin}">
|
||||
<b:form>
|
||||
<b:selectOneMenu value="#{sessionBean.username}">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Benutzer" />
|
||||
</f:facet>
|
||||
<f:selectItem itemValue="henkej" itemLabel="Jörg Henke" />
|
||||
</b:selectOneMenu>
|
||||
<b:inputSecret value="#{sessionBean.secret}">
|
||||
<f:facet name="prepend">
|
||||
<h:outputText value="Passwort" />
|
||||
</f:facet>
|
||||
</b:inputSecret>
|
||||
<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:panel>
|
||||
</ui:define>
|
||||
<ui:define name="navigation">
|
||||
<b:form rendered="#{sessionBean.hasLogin}">
|
||||
<b:buttonGroup>
|
||||
<b:commandButton action="#{noteControl.toList}" value="#{noteControl.amount} Notizen verwalten" look="primary" iconAwesome="comments-o" 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="#{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="#{sessionControl.doLogout}" value="abmelden" look="danger" iconAwesome="sign-out" />
|
||||
</b:buttonGroup>
|
||||
</b:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</h:body>
|
||||
</html>
|
@ -1,24 +1,24 @@
|
||||
<!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>
|
||||
<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:body styleClass="body">
|
||||
<h:outputStylesheet name="css/style.css" />
|
||||
<h:outputScript library="bsf" name="jq/jquery.js" target="head" />
|
||||
<div class="page">
|
||||
<div class="top">
|
||||
<ui:insert name="top" />
|
||||
</div>
|
||||
<div>
|
||||
<b:messages />
|
||||
</div>
|
||||
<div class="body">
|
||||
<ui:insert name="main" />
|
||||
</div>
|
||||
<div class="navigation">
|
||||
<ui:insert name="navigation" />
|
||||
</div>
|
||||
</div>
|
||||
<h:outputStylesheet name="css/style.css" />
|
||||
<h:outputScript library="bsf" name="jq/jquery.js" target="head" />
|
||||
<div class="page">
|
||||
<div class="top">
|
||||
<ui:insert name="top" />
|
||||
</div>
|
||||
<div>
|
||||
<b:messages />
|
||||
</div>
|
||||
<div class="main">
|
||||
<ui:insert name="main" />
|
||||
</div>
|
||||
<div class="navigation">
|
||||
<ui:insert name="navigation" />
|
||||
</div>
|
||||
</div>
|
||||
</h:body>
|
||||
</html>
|
||||
|
@ -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;
|
||||
}
|
Reference in New Issue
Block a user