Commit 2027f96a by Tuomas Riihimäki

Merge branch 'newui' of codecrew.fi:bortal into newui

Conflicts:
	code/LanBortalWeb/src/fi/insomnia/bortal/resources/i18n_fi.properties
2 parents d32afa3f 38c9e760
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:user="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools">
<h:body>
<ui:composition
template="/layout/#{sessionHandler.fullscreen}/template.xhtml">
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{userView.initView}" />
</f:metadata>
<ui:define name="topbar">
<h:link outcome="/admin/info/index" class="userbackbutton" value="">
<div>
<h:outputText value="#{i18n['infoview.back']}" />
</div>
</h:link>
</ui:define>
<ui:define name="content">
<h:link outcome="/admin/info/shop" class="usertile" value="">
<div>
<img src="#{request.contextPath}/resources/style/blipview/img/shop.png" />
<h:outputText value="#{i18n['infoview.shop']}" />
</div>
</h:link>
<h:link outcome="/admin/info/shop" class="usertile" value="">
<div>
<img src="#{request.contextPath}/resources/style/blipview/img/computer.png" />
<h:outputText value="#{i18n['infoview.computerplace']}" />
</div>
</h:link>
</ui:define>
<ui:define name="sidebar">
<user:tileview />
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
...@@ -18,13 +18,11 @@ ...@@ -18,13 +18,11 @@
</f:metadata> </f:metadata>
<f:metadata> <f:metadata>
<f:event type="preRenderView" listener="#{readerListDataView.initView}" /> <f:event type="preRenderView" listener="#{readerListDataView.initView}" />
<f:event type="preRenderView" listener="#{readerList.initReaderList}" />
</f:metadata> </f:metadata>
<ui:define name="content"> <ui:define name="content">
<h:form>
<h:inputText name="barcode" value="#{barcodeView.barcode}" />
<h:commandButton action="#{barcodeView.readBarcode}"
value="#{i18n['barcodeReader.readBarcode']}" />
</h:form>
<br /> <br />
<br /> <br />
<shop:readeventtiles /> <shop:readeventtiles />
...@@ -32,7 +30,14 @@ ...@@ -32,7 +30,14 @@
</ui:define> </ui:define>
<ui:define name="sidebar"> <ui:define name="sidebar">
<shop:readerlist />
<shop:readerlisttiles />
<br />
<h:form>
<h:inputText name="barcode" value="#{barcodeView.barcode}" />
<h:commandButton action="#{barcodeView.readBarcode}"
value="#{i18n['barcodeReader.readBarcode']}" />
</h:form>
</ui:define> </ui:define>
</ui:composition> </ui:composition>
......
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui"
xmlns:user="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools">
<h:body>
<ui:composition
template="/layout/#{sessionHandler.fullscreen}/template.xhtml">
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{userView.initView}" />
</f:metadata>
<ui:define name="topbar">
<h:link outcome="/admin/info/general" class="userbackbutton" value="">
<div>
<h:outputText value="#{i18n['infoview.back']}" />
</div>
</h:link>
</ui:define>
<ui:define name="content">
<h1>Kaappa</h1>
</ui:define>
<ui:define name="sidebar">
<user:tileview />
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
...@@ -30,16 +30,16 @@ ...@@ -30,16 +30,16 @@
<h:body> <h:body>
<div class="container top"> <div class="container top">
<ui:insert name="topbar" />
</div> </div>
<div class="container clearfix"> <div class="container clearfix">
<div id="right"> <div id="right">
<ui:insert name="sidebar" style="border-left: 1px solid black;"/> <ui:insert name="sidebar" />
</div> </div>
<div id="left" style="width: 800px;"> <div id="left">
<ui:insert name="content" /> <ui:insert name="content" />
</div> </div>
......
<?xml version='1.0' encoding='UTF-8' ?>
<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools"
xmlns:p="http://primefaces.org/ui">
<composite:interface>
</composite:interface>
<composite:implementation>
<h:form id="readerlist">
<h:dataTable id="reader" value="#{readerListDataView.readers}" var="rr">
<h:column>
<f:facet name="header">
<h:outputText value="${i18n['reader.name']}" />
</f:facet>
<h:outputText value="#{rr.identification}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="${i18n['reader.description']}" />
</f:facet>
<h:outputText value="#{rr.description}" />
</h:column>
<h:column>
<p:commandButton ajax="false" action="#{readerView.setReaderToId(rr.id)}" value="#{i18n['reader.select']}" />
</h:column>
</h:dataTable>
</h:form>
</composite:implementation>
</html>
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<composite:implementation> <composite:implementation>
<h:form> <h:form>
<p:poll interval="3" /> <p:poll interval="3" />
<ui:repeat value="#{readerView.readerEvents}" var="event" rendered="#{readerView.readerSelected}"> <ui:repeat value="#{readerView.readerEvents}" var="event" >
<h:link styleClass="userimagetile" outcome="/user/edit" <h:link styleClass="userimagetile" outcome="/admin/info/general"
rendered="#{!empty event.printedCard.user}"> rendered="#{!empty event.printedCard.user}">
<div> <div>
......
<?xml version='1.0' encoding='UTF-8' ?>
<!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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:tools="http://java.sun.com/jsf/composite/tools">
<composite:interface>
</composite:interface>
<composite:implementation>
<h:dataTable id="reader" value="#{readerListDataView.readers}" var="rr">
<h:column>
<f:facet name="header">
<h:outputText value="${i18n['reader.name']}" />
</f:facet>
<h:outputText value="#{rr.identification}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="${i18n['reader.description']}" />
</f:facet>
<h:outputText value="#{rr.description}" />
</h:column>
<h:column>
<h:link outcome="/shop/showReaderEvents" value="#{i18n['reader.select']}">
<f:param value="#{rr.id}" name="readerId" />
</h:link>
</h:column>
<h:column>
<h:link outcome="/shop/editReader" value="#{i18n['reader.edit']}">
<f:param value="#{rr.id}" name="readerId" />
</h:link>
</h:column>
</h:dataTable>
</composite:implementation>
</html>
<?xml version='1.0' encoding='UTF-8' ?>
<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:tools="http://java.sun.com/jsf/composite/tools"
xmlns:p="http://primefaces.org/ui">
<composite:interface>
</composite:interface>
<composite:implementation>
<h:outputScript library="primefaces" name="jquery/jquery.js"
target="head" />
<div style="width: 300px; margin: 0 auto;">
<h:form id="userform" enctype="multipart/form-data">
<ui:fragment rendered="#{not empty userView.user.id}">
<h:outputText rendered="#{empty userView.user.currentImage}"
value="#{i18n['user.noCurrentImage']}" />
<ui:fragment rendered="#{!empty userView.user.currentImage}">
<img style="width: 150px;"
src="#{request.contextPath}/dydata/userimage/#{userView.user.currentImage.id}.img"
alt="image" />
</ui:fragment>
<br />
</ui:fragment>
<h:outputText value="#{userView.selectedUser.nick}" />
<br />
<h:outputText value="#{userView.selectedUser.wholeName}" />
<br /><br />
<h:outputText value="#{userView.selectedUser.address}" />
<br />
<h:outputText value="#{userView.selectedUser.zip}" />
<h:outputText value=" #{userView.selectedUser.town}" />
<br /><br />
<h:outputText value="#{userView.selectedUser.email}" />
<br />
<h:outputText value="#{userView.selectedUser.phone}" />
<br />
</h:form>
</div>
</composite:implementation>
</html>
...@@ -77,12 +77,12 @@ a.shopItem:active { ...@@ -77,12 +77,12 @@ a.shopItem:active {
background: red; background: red;
} }
a.userimagetile { a.userimagetile, a.usertile {
float: left; float: left;
} }
a.userimagetile div { a.userimagetile div {
width: 128px; width: 128px;
height: 192px; height: 224px;
border: 1px solid black; border: 1px solid black;
margin: 2px; margin: 2px;
} }
...@@ -91,6 +91,27 @@ a.userimagetile div img { ...@@ -91,6 +91,27 @@ a.userimagetile div img {
} }
.usertilenick { .usertilenick {
font-size: 14pt; font-size: 14pt;
}
a.userbackbutton:link, a.userbackbutton:visited {
color: black;
text-decoration: none;
}
a.userbackbutton div{
background: #CEE4ED;
width:8em;
height: 2em;
padding: 1em;
border: 1px solid black;
}
a.usertile div {
background: #CEE4ED;
width: 10em;
height: 10em;
padding: 1em;
margin: 1em;
border: 1px solid black;
} }
...@@ -127,32 +127,3 @@ vertical-align: top; ...@@ -127,32 +127,3 @@ vertical-align: top;
label { label {
} }
/* input {
border: 1px solid #ccc;
padding: 3px 6px;
border-radius: 6px;
background:rgba(0,130,250,0.1);
margin-right: 1em;
}
input:focus{
border: 1px solid black;
background:rgba(0,130,250,0.2);
}
input[type=submit] {
padding: 4px 16px;
border-radius: 8px;
border: 1px solid black;
background: skyblue;
}
input[type=submit]:hover {
padding: 4px 16px;
border-radius: 8px;
border: 1px solid black;
background: lightblue;
}
*/
...@@ -207,6 +207,10 @@ imagefile.file = Imagefile ...@@ -207,6 +207,10 @@ imagefile.file = Imagefile
importuser.file = File importuser.file = File
importuser.template = Template importuser.template = Template
infoview.back = Back
infoview.computerplace = Computer places
infoview.shop = Shop
invite.emailexists = User with that email address already exists in the system. invite.emailexists = User with that email address already exists in the system.
invite.notFound = Invite invalid or already used invite.notFound = Invite invalid or already used
invite.successfull = Invite sent successfully invite.successfull = Invite sent successfully
...@@ -530,6 +534,7 @@ shop.count = Q ...@@ -530,6 +534,7 @@ shop.count = Q
shop.price = price shop.price = price
shop.product = Product shop.product = Product
shop.readBarcode = Read shop.readBarcode = Read
shop.shop = Shop
shop.totalPrice = Total shop.totalPrice = Total
shop.user = Selling to shop.user = Selling to
......
...@@ -214,6 +214,10 @@ importuser.template = Malli ...@@ -214,6 +214,10 @@ importuser.template = Malli
index.title = Etusivu index.title = Etusivu
infoview.back = Takaisin
infoview.computerplace = Tietokonepaikat
infoview.shop = Kauppa
invite.emailexists = J\u00E4rjestelm\u00E4ss\u00E4 on jo k\u00E4ytt\u00E4j\u00E4tunnus samalla s\u00E4hk\u00F6postiosoitteella. invite.emailexists = J\u00E4rjestelm\u00E4ss\u00E4 on jo k\u00E4ytt\u00E4j\u00E4tunnus samalla s\u00E4hk\u00F6postiosoitteella.
invite.notFound = Kutsu virheellinen tai jo k\u00E4ytetty. invite.notFound = Kutsu virheellinen tai jo k\u00E4ytetty.
invite.successfull = Kutsu l\u00E4hetetty invite.successfull = Kutsu l\u00E4hetetty
......
...@@ -123,10 +123,10 @@ public class ReaderView extends GenericCDIView { ...@@ -123,10 +123,10 @@ public class ReaderView extends GenericCDIView {
public void initReaderList() { public void initReaderList() {
if (super.requirePermissions(ShopPermission.SHOP_TO_OTHERS)) { if (super.requirePermissions(ShopPermission.SHOP_TO_OTHERS)) {
} }
} }
public List<Product> getAutoProducts() { public List<Product> getAutoProducts() {
List<Product> ret = new ArrayList<Product>(); List<Product> ret = new ArrayList<Product>();
...@@ -216,6 +216,13 @@ public class ReaderView extends GenericCDIView { ...@@ -216,6 +216,13 @@ public class ReaderView extends GenericCDIView {
this.readerid = readerid; this.readerid = readerid;
} }
public String setReaderToId(Integer readerid) {
this.readerid = readerid;
this.namecontainer.setReaderId(readerid);
reader = readerbean.getReader(readerid);
return "/admin/info/index";
}
public Reader getReader() { public Reader getReader() {
return reader; return reader;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!