Commit b64ba3b7 by Tuomas Riihimäki

Merge branch 'assymuutoksia_loppufixei' into 'master'

Assymuutoksia loppufixei

See merge request !167
2 parents 248dc1a2 e984bdf2
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "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" <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:bills="http://java.sun.com/jsf/composite/cditools/bills" xmlns:h="http://java.sun.com/jsf/html" xmlns:bills="http://java.sun.com/jsf/composite/cditools/bills"
xmlns:f="http://java.sun.com/jsf/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"
> >
<h:body> <h:body>
<ui:composition template="#{sessionHandler.template}"> <ui:composition template="#{sessionHandler.template}">
...@@ -13,6 +13,14 @@ ...@@ -13,6 +13,14 @@
</f:metadata> </f:metadata>
<ui:define name="content"> <ui:define name="content">
<bills:list /> <bills:list />
<br /><br />
<p:outputPanel rendered="#{placeGroupView.useEticket}" >
<p>
<p:button outcome="/place/myEtickets" value="#{i18n['placegroup.showEticket']}" />
</p>
</p:outputPanel>
<br /><br />
</ui:define> </ui:define>
</ui:composition> </ui:composition>
</h:body> </h:body>
......
...@@ -79,19 +79,19 @@ ...@@ -79,19 +79,19 @@
<h:panelGrid columns="3" cellpadding="10"> <h:panelGrid columns="3" cellpadding="10">
<h:panelGrid columns="2"> <h:panelGrid columns="2">
<div <div
style="border-color: black; border-style: solid; border-width: 1px; background-color: grey; width: 10px; height: 10px;">&nbsp;</div> style="border-color: black; border-style: solid; border-width: 1px; background-color: rgb(83, 83, 83); width: 10px; height: 10px;">&nbsp;</div>
<h:outputText value="#{i18n['placeSelect.legend.grey']}" /> <h:outputText value="#{i18n['placeSelect.legend.grey']}" />
<div <div
style="border-color: black; border-style: solid; border-width: 1px; background-color: white; width: 10px; height: 10px;">&nbsp;</div> style="border-color: black; border-style: solid; border-width: 1px; background-color: rgb(204, 204, 204); width: 10px; height: 10px;">&nbsp;</div>
<h:outputText value="#{i18n['placeSelect.legend.white']}" /> <h:outputText value="#{i18n['placeSelect.legend.white']}" />
<div <div
style="border-color: black; border-style: solid; border-width: 1px; background-color: red; width: 10px; height: 10px;">&nbsp;</div> style="border-color: black; border-style: solid; border-width: 1px; background-color: rgb(180, 1, 0); width: 10px; height: 10px;">&nbsp;</div>
<h:outputText value="#{i18n['placeSelect.legend.red']}" /> <h:outputText value="#{i18n['placeSelect.legend.red']}" />
<div <div
style="border-color: black; border-style: solid; border-width: 1px; background-color: green; width: 10px; height: 10px;">&nbsp;</div> style="border-color: black; border-style: solid; border-width: 1px; background-color: rgb(47, 165, 37); width: 10px; height: 10px;">&nbsp;</div>
<h:outputText value="#{i18n['placeSelect.legend.green']}" /> <h:outputText value="#{i18n['placeSelect.legend.green']}" />
<div <div
style="border-color: black; border-style: solid; border-width: 1px; background-color: blue; width: 10px; height: 10px;">&nbsp;</div> style="border-color: black; border-style: solid; border-width: 1px; background-color: rgb(67, 66, 193); width: 10px; height: 10px;">&nbsp;</div>
<h:outputText value="#{i18n['placeSelect.legend.blue']}" /> <h:outputText value="#{i18n['placeSelect.legend.blue']}" />
</h:panelGrid> </h:panelGrid>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<h:body> <h:body>
<ui:composition template="#{sessionHandler.template}"> <ui:composition template="#{sessionHandler.template}">
<f:metadata> <f:metadata>
<f:event type="preRenderView" listener="#{eticketView.initView()}" />
</f:metadata> </f:metadata>
<ui:define name="title"> <ui:define name="title">
......
...@@ -84,14 +84,18 @@ ...@@ -84,14 +84,18 @@
<p:button outcome="/place/myEtickets" value="#{i18n['placegroup.showEticket']}" /> <p:button outcome="/place/myEtickets" value="#{i18n['placegroup.showEticket']}" />
</p> </p>
</p:outputPanel> </p:outputPanel>
<h2>#{i18n['placetoken.pageHeader']}</h2>
<p>#{i18n['placetoken.topText']}</p> <p:outputPanel rendered="#{!placeGroupView.printOnlyOwn}">
<h:form id="placeTokenForm" rendered="#{!placeGroupView.printOnlyOwn}"> <h2>#{i18n['placetoken.pageHeader']}</h2>
<p>#{i18n['placetoken.topText']}</p>
<h:outputLabel value="#{i18n['placetoken.token']}:" /> <h:form id="placeTokenForm">
<h:inputText value="#{tokenView.token}" />
<h:commandButton id="commitbtn" action="#{tokenView.saveToken()}" value="#{i18n['placetoken.commit']}" /> <h:outputLabel value="#{i18n['placetoken.token']}:" />
</h:form> <h:inputText value="#{tokenView.token}" />
<h:commandButton id="commitbtn" action="#{tokenView.saveToken()}" value="#{i18n['placetoken.commit']}" />
</h:form>
</p:outputPanel>
</ui:define> </ui:define>
</ui:composition> </ui:composition>
......
...@@ -90,6 +90,13 @@ public class EticketView extends GenericCDIView { ...@@ -90,6 +90,13 @@ public class EticketView extends GenericCDIView {
return barcodeBean.getUserTextCode(userView.getSelectedUser()); return barcodeBean.getUserTextCode(userView.getSelectedUser());
} }
public void initView() {
List<GroupMembership> gmlist = ticketBean.findMembershipPrintlistForUser(userView.getSelectedUser());
if(gmlist == null || gmlist.size() <= 0)
super.navihandler.forward("/shop/createBill?faces-redirect=true");
}
public ListDataModel<GroupMembership> getGroupMemberships() { public ListDataModel<GroupMembership> getGroupMemberships() {
memberlist = new ListDataModel<GroupMembership>(ticketBean.findMembershipPrintlistForUser(userView.getSelectedUser())); memberlist = new ListDataModel<GroupMembership>(ticketBean.findMembershipPrintlistForUser(userView.getSelectedUser()));
......
...@@ -90,6 +90,7 @@ public class PlacegroupView extends GenericCDIView { ...@@ -90,6 +90,7 @@ public class PlacegroupView extends GenericCDIView {
return eventBean.getPropertyBoolean(LanEventPropertyKey.USE_ETICKET); return eventBean.getPropertyBoolean(LanEventPropertyKey.USE_ETICKET);
} }
public boolean isPrintOnlyOwn() { public boolean isPrintOnlyOwn() {
return eventBean.getPropertyBoolean(LanEventPropertyKey.PLACECODE_PRINT_ONLY_OWN); return eventBean.getPropertyBoolean(LanEventPropertyKey.PLACECODE_PRINT_ONLY_OWN);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!