listOrders.xhtml 5.04 KB
<!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"
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
		<f:metadata>
			<f:viewParam name="foodwaveid" value="#{foodWaveView.foodWaveId}" />
			<f:event type="preRenderView" listener="#{foodWaveView.initFoodWaveOrderList}" />
			<!-- 		<f:event type="preRenderView" listener="#{foodWaveView.initFoodwaveAccountEventList}" /> -->
		</f:metadata>

		<ui:define name="title">
			<h1>fixme</h1>
		</ui:define>
		<ui:define name="content">

			<h:form>
				<p:dataTable styleClass="bordertable" value="#{foodWaveView.billLines}" var="bill_line">
					<f:facet name="header">
						<h:outputLabel value="#{i18n['foodWave.billLines']}" />
					</f:facet>
					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['billLine.time']}" />
						</f:facet>
						<h:outputText value="#{bill_line.bill.sentDate.getTime()}">
							<f:convertDateTime pattern="hh:mm d/M/yy" />
						</h:outputText>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['billLine.quantity']}" />
						</f:facet>
						<h:outputText value="#{bill_line.quantity}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['billLine.product']}" />
						</f:facet>
						<h:outputText value="#{bill_line.name}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel  value="#{i18n['billLine.eventuser']}" />
						</f:facet>
						<h:link outcome="/useradmin/edit" value="#{bill_line.bill.user.wholeName}">
							<f:param name="userid" value="#{bill_line.bill.user.id}" />
						</h:link>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel  value="#{i18n['billLine.nick']}" />
						</f:facet>
						<h:link outcome="/useradmin/edit" value="#{bill_line.bill.user.nick}">
							<f:param name="userid" value="#{bill_line.bill.user.id}" />
						</h:link>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['billLine.price']}" />
						</f:facet>
						<h:outputText value="#{bill_line.linePrice}" />
					</p:column>

					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['bill.totalprice']}" />
						</f:facet>
						<h:outputText value="#{bill_line.bill.totalPrice}" />
					</p:column>

					<p:column>
						<h:commandButton value="#{i18n['bill.markPaid']}" action="#{foodWaveView.markBillPaid}" />
					</p:column>
					<!-- 
				<p:column>
					<h:commandButton value="#{i18n['bill.remove']}" action="foodWaveView.markBillRemoved" />
				</p:column> -->

				</p:dataTable>
			</h:form>
			<br />
			<br />

			<h1>
				<h:outputLabel value="#{i18n['foodwave.orders']}" />
			</h1>
			<h:form>
				<p:dataTable styleClass="bordertable" value="#{foodWaveView.accountEventLines}" var="acc_line">
					<f:facet name="header">
						<h:outputLabel value="#{i18n['foodWave.accountevents']}" />
					</f:facet>
					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['acc_lines.time']}" />
						</f:facet>
						<h:outputText value="#{acc_line.eventTime.getTime()}">
							<f:convertDateTime pattern="hh:mm d/M/yy" />
						</h:outputText>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['acc_line.quantity']}" />
						</f:facet>
						<h:outputText value="#{acc_line.quantity}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel  value="#{i18n['acc_line.product']}" />
						</f:facet>
						<h:outputText value="#{acc_line.product.name}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel  value="#{i18n['acc_line.eventuser']}" />
						</f:facet>
						<h:link outcome="/useradmin/edit" value="#{acc_line.user.wholeName}">
							<f:param  value="#{acc_line.user.id}" />
						</h:link>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel value="#{i18n['acc_line.nick']}" />
						</f:facet>
						<h:link outcome="/useradmin/edit" value="#{acc_line.user.nick}">
							<f:param value="#{acc_line.user.id}" />
						</h:link>
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputLabel  value="#{i18n['accountEvent.delivered']}" />
						</f:facet>
						<h:outputText rendered="#{acc_line.delivered}" value="#{i18n['accountEvent.delivered']}" />
						<h:commandButton rendered="#{not acc_line.eventDelivered}" value="#{i18n['accountEvent.deliver']}" action="#{foodWaveView.deliverAccountEvent}" />
					</p:column>
				</p:dataTable>

			</h:form>
		</ui:define>


	</ui:composition>
</h:body>
</html>