Commit 454f7c0e by Tuomas Riihimäki

Merge branch 'master' of codecrew.fi:bortal

2 parents 45ed677c ea6c8c39
......@@ -107,6 +107,9 @@ public class CardPrintBean implements CardPrintBeanLocal {
.read(new ByteArrayInputStream(user.getCurrentImage()
.getImageData()));
if(faceBufferedImage.getWidth() > 1024 || faceBufferedImage.getHeight() > 1024) {
throw new Exception("Image dimensions too large, please take/upload smaller!");
}
int originalWidth = faceBufferedImage.getWidth();
int originalHeight = faceBufferedImage.getHeight();
......
......@@ -41,14 +41,14 @@
<h:commandButton action="#{foodWaveView.saveTemplate()}"
value="#{i18n['foodwavetemplate.save']}" />
</h:panelGrid>
<h:selectOneMenu value="#{foodWaveView.currentProduct}"
<!-- <h:selectOneMenu value="#{foodWaveView.currentProduct}"
converter="#{productConverter}">
<f:selectItems value="#{foodWaveView.products}" var="product"
itemLabel="#{product.name}"></f:selectItems>
</h:selectOneMenu>
<p:commandButton value="#{i18n['foodwavetemplate.addproduct']}"
actionListener="#{foodWaveView.addProductToTemplate}"
update="productTable" />
update="productTable" /> -->
<h:panelGrid columns="4">
......
<!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:products="http://java.sun.com/jsf/composite/cditools/products" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:c="http://java.sun.com/jsp/jstl/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:products="http://java.sun.com/jsf/composite/cditools/products"
xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<ui:composition
template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<f:event type="preRenderView" listener="#{foodWaveView.initTemplateList()}" />
<f:viewParam name="id" value="#{foodWaveView.templateId}" />
<f:event type="preRenderView"
listener="#{foodWaveView.initTemplateList()}" />
</f:metadata>
<ui:define name="title">
......
<!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:foodwave="http://java.sun.com/jsf/composite/cditools/foodwave" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:c="http://java.sun.com/jsp/jstl/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:foodwave="http://java.sun.com/jsf/composite/cditools/foodwave"
xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui">
<h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<ui:composition
template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveManagerList}" />
<f:event type="preRenderView"
listener="#{foodWaveView.initFoodwaveManagerList}" />
</f:metadata>
<ui:define name="title">
<h1>fixme</h1>
<h1>#{i18n['foodWave.list']}</h1>
</ui:define>
<ui:define name="content">
<h:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign" styleClass="bordertable" value="#{foodWaveView.foodWaves}" var="foodwave">
<h:column >
<p:dataTable
styleClass="bordertable" value="#{foodWaveView.foodWaves}"
var="foodwave" >
<p:column>
<f:facet name="header">
<h:outputLabel id="name" value="${i18n['foodWave.name']}" />
<h:outputText value="${i18n['foodWave.time']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodwave.name}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
<h:outputText value="#{foodwave.time.time}">
<f:convertDateTime pattern="hh:mm d/M/yy" />
</h:outputText>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.template.name']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodwave.template.name}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
<h:outputText value="#{foodwave.template.name}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.orders']}" />
<h:outputLabel id="name" value="${i18n['foodWave.name']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodwave.accountEvents.size()}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
<h:outputText value="#{foodwave.name}" />
</p:column>
<p:column styleClass="text-center">
<f:facet name="header">
<h:outputText value="${i18n['foodWave.unconfirmedOrders']}" />
<h:outputText value="${i18n['foodWave.paid']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodwave.billLines.size()}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
<h:outputText value="#{foodwave.accountEvents.size()}" />
</p:column>
<p:column styleClass="text-center">
<f:facet name="header">
<h:outputText value="${i18n['foodWave.totalReserved']}" />
<h:outputText value="${i18n['foodWave.unconfirmedOrders']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodwave.reservedCount}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
<h:outputText value="#{foodwave.billLines.size()}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.time']}" />
<h:outputText value="${i18n['foodWave.totalReserved']}" />
</f:facet>
<h:outputText value="#{foodwave.reservedCount}" /> / <h:outputText
value="#{foodwave.maximumFoods}" />
</p:column>
<p:column>
<h:link outcome="/foodmanager/listOrders"
value="#{foodwave.time.time}">
value="#{i18n['foodWave.show']}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
</h:dataTable>
</p:column>
</p:dataTable>
</ui:define>
......
<!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:foodwave="http://java.sun.com/jsf/composite/cditools/foodwave" xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:c="http://java.sun.com/jsp/jstl/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:foodwave="http://java.sun.com/jsf/composite/cditools/foodwave"
xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://primefaces.org/ui">
<h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<ui:composition
template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<f:viewParam name="foodwaveid" value="#{foodWaveView.foodWaveId}" required="true"/>
<f:event type="preRenderView" listener="#{foodWaveView.initFoodWaveOrderList}" />
<!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
<f:viewParam name="foodwaveid" value="#{foodWaveView.foodWaveId}"
required="true" />
<f:event type="preRenderView"
listener="#{foodWaveView.initFoodWaveOrderList}" />
<!-- <f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
</f:metadata>
<ui:define name="title">
......@@ -16,62 +25,69 @@
</ui:define>
<ui:define name="content">
<h1><h:outputLabel id="name" value="${i18n['foodWave.billLines']}" /></h1>
<h:dataTable columnClasses="nowrap,numalign,numalign,nowrap,numalign" styleClass="bordertable" value="#{foodWaveView.billLines}" var="billLine">
<h:column >
<h1>
<h:outputLabel id="name" value="${i18n['foodWave.billLines']}" />
</h1>
<p:dataTable
styleClass="bordertable" value="#{foodWaveView.foodWaves.billLines}"
var="foodwave" >
<p:column>
<f:facet name="header">
<h:outputLabel id="name" value="${i18n['billLine.name']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{billLine.name}">
<h:link outcome="/foodmanager/listOrders" value="#{foodwave.billLines.name}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['billLine.quantiny']}" />
<h:outputText value="${i18n['billLine.quantity']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders"
value="#{foodwave.template.name}">
<f:param name="foodwaveid" value="#{foodWaveView.billLines.rowCount}" />
value="#{foodwave.billLines.rowCount}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['billLine.unitprice']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodWaveView.currentProduct.price}">
<h:link outcome="/foodmanager/listOrders"
value="#{foodwave.currentProduct.price}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
<h:column>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.unconfirmedOrders']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodWaveView.billLines.rowCount}">
<h:link outcome="/foodmanager/listOrders"
value="#{foodwave.billLines.rowCount}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column><!--
<h:column>
</p:column>
<!--
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.totalReserved']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders" value="#{foodWaveView.currentProduct.totalreserved}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column> -->
<h:column>
</p:column> -->
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['foodWave.time']}" />
</f:facet>
<h:link outcome="/foodmanager/listOrders"
value="#{foodwave.time.time}">
value="#{foodwave.billLine}">
<f:param name="foodwaveid" value="#{foodwave.id}" />
</h:link>
</h:column>
</h:dataTable>
</p:column>
</p:dataTable>
</ui:define>
......
......@@ -17,3 +17,6 @@ display: none;
}
.text-center {
text-align: center;
}
\ No newline at end of file
......@@ -182,10 +182,16 @@ eventorganiser.name = Eventorganiser
food = Food
foodWave.description = Description
foodWave.name = Name
foodWave.template.name = Name
foodWave.time = Time
foodWave.description = Description
foodWave.list = FoodWave Listing
foodWave.name = Foodwave
foodWave.orders = Amount of Orders
foodWave.paid = Paid
foodWave.show = Show
foodWave.template.name = Template
foodWave.time = Time
foodWave.totalReserved = Total
foodWave.unconfirmedOrders = Unconfirmed
foodshop.buyFromCounter = Pay at info
foodshop.buyFromInternet = Pay at Internet
......
......@@ -180,10 +180,16 @@ eventorganiser.name = Tapahtumaj\u00E4rjest\u00E4j\u00E4
food = Ruoka
foodWave.description = Kuvaus
foodWave.name = Nimi
foodWave.template.name = Nimi
foodWave.time = Aika
foodWave.description = Kuvaus
foodWave.list = Ruokatilausten listaus
foodWave.name = Ruokatilaus
foodWave.orders = Tilausten M\u00E4\u00E4r\u00E4
foodWave.paid = Maksettuja
foodWave.show = N\u00E4yt\u00E4
foodWave.template.name = Template
foodWave.time = Aika
foodWave.totalReserved = Yhteens\u00E4
foodWave.unconfirmedOrders = Vahvistamattomia
foodshop.buyFromCounter = Maksa infossa
foodshop.buyFromInternet = Maksa Internetiss\u00E4
......
......@@ -79,7 +79,8 @@ public class FoodWaveView extends GenericCDIView {
selectedFoodWave.setTime(c);
foodWaveBean.createFoodWave(selectedFoodWave);
// initFoodwaveManagerList();
initFoodwaveManagerList();
return "/foodmanager/listFoodwaves";
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!