eticketStandalone.xhtml 4.69 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: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"
      xmlns:p="http://primefaces.org/ui">
<h:body>
    <ui:composition template="#{sessionHandler.fullscreen}">
        <f:metadata>
            <f:viewParam name="t" value="#{standaloneEticketView.token}" />
            <f:event type="preRenderView" listener="#{standaloneEticketView.initView}" />
        </f:metadata>

        <ui:define name="title">
			<h1>#{standaloneEticketView.user.event.name}</h1>
        </ui:define>

        <ui:define name="content">
			<h2>#{i18n['etickets.title']}</h2>


            <h:form id="etickets">


                                <br /><br />
                                <p:commandButton value="#{i18n['print']}" type="button" icon="ui-icon-print"  style="display:block;margin-bottom: 20px">
                                    <p:printer target="eticketpanel"/>
                                </p:commandButton>


                                <p:outputPanel id="eticketpanel">

                                    <p:fieldset legend="#{i18n['etickets.eticketcode']}" style="width: 250px; ">
                                        <p:outputPanel style="text-align: center;">

                                            <p:barcode id="userqrcode" value="#{standaloneEticketView.userTextCode}" type="qr" width="200" height="200"/><br />
                                            <p:outputLabel for="userqrcode" value="#{standaloneEticketView.userTextCode}"/>
                                        </p:outputPanel>
                                    </p:fieldset>
                                    <br /><br />

                                    <p:fieldset legend="#{i18n['etickets.placeinfo']}">
                                        <p:dataTable value="#{standaloneEticketView.groupMemberships}" var="member" id="placestable">

                                            <p:column>
                                                <f:facet name="header">
                                                    <h:outputText value="#{i18n['etickets.place']}"/>
                                                </f:facet>
                                                <h:outputText value="#{member.placeReservation.name}"/>
                                            </p:column>
                                            <p:column>
                                                <f:facet name="header">
                                                    <h:outputText value="#{i18n['etickets.product']}"/>
                                                </f:facet>
                                                <h:outputText value="#{member.placeReservation.product.name}"/>
                                            </p:column>
                                            <p:column>
                                                <f:facet name="header">
                                                    <h:outputText value="#{i18n['etickets.user']}"/>
                                                </f:facet>

                                                <h:outputText rendered="#{!empty member.user}" value="#{member.user.wholeName} (#{member.user.nick})"/>
                                                <h:outputText rendered="#{empty member.user}" value="#{member.placeGroup.creator.firstnames} #{member.placeGroup.creator.lastname} (#{member.placeGroup.creator.nick})" />
                                            </p:column>
                                        </p:dataTable>
                                    </p:fieldset>
                                    <br /><br />



                                    <p:outputPanel id="mapPanel">
                                        <h2>#{i18n['etickets.placemap']}</h2>
                                        <p:commandButton rendered="#{!standaloneEticketView.mapVisible}" value="#{i18n['etickets.showMap']}" actionListener="#{standaloneEticketView.showMap}" update="mapPanel" />
                                        <p:graphicImage id="mapImage" rendered="#{standaloneEticketView.mapVisible}" url="/PlaceMap?mapid=#{mapView.activeMap.id}&amp;token=#{standaloneEticketView.token}" styleClass="printImage"/>
                                    </p:outputPanel>

                </p:outputPanel>


            </h:form>


        </ui:define>


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