adminGroups.xhtml
4.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!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:c="http://java.sun.com/jsp/jstl/core" xmlns:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<ui:param name="thispage" value="page.place.mygroups" />
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{userView.initView}" />
</f:metadata>
<ui:define name="title">
<h1>#{i18n['placegroupview.header']}</h1>
<!-- <users:usertabs tabId="groups" /> -->
</ui:define>
<ui:define name="edittab">
<users:usertabs tabId="groups" />
</ui:define>
<ui:define name="content">
<h:outputText rendered="#{empty placeGroupView.groupMemberships}" value="#{i18n['placegroupview.noMemberships']}" />
<h:form rendered="#{!empty placeGroupView.groupMemberships}" id="placelistform">
<h:dataTable value="#{placeGroupView.groupMemberships}" var="member">
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['placegroupview.reservationName']}" />
</f:facet>
<h:outputText value="#{member.placeReservation.name}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['placegroupview.token']}" />
</f:facet>
<h:outputText rendered="#{empty member.user}" value="#{member.inviteToken}" />
<h:outputText rendered="#{!empty member.user}" value="#{member.user.firstnames} #{member.user.lastname} (#{member.user.nick})" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{i18n['placegroupview.groupCreator']}" />
</f:facet>
<h:outputText value="#{member.placeGroup.creator.firstnames} #{member.placeGroup.creator.lastname} (#{member.placeGroup.creator.nick})" />
</h:column>
<h:column>
<h:commandButton rendered="#{placeGroupView.canModifyCurrent and placeGroupView.currentMemberUserNotNull}" action="#{placeGroupView.releasePlace()}" value="#{i18n['placegroupview.releasePlace']}" />
</h:column>
</h:dataTable>
</h:form>
<p>
<input type="button" onclick="location.replace('#{request.contextPath}/PlaceGroupPdf?eventuserId=#{placeGroupView.user.id}');" value="#{i18n['placegroup.printPdf']}" />
</p>
<h2>#{i18n['placetoken.pageHeader']}</h2>
<p>#{i18n['placetoken.topText']}</p>
<h:form id="placeTokenForm">
<h:outputLabel value="#{i18n['placetoken.token']}:" />
<h:inputText value="#{tokenView.token}" />
<h:commandButton id="commitbtn" action="#{tokenView.saveToken()}" value="#{i18n['placetoken.commit']}" />
</h:form>
<h2>Place slots</h2>
<h:form>
<p:dataTable var="slot" value="#{placeGroupView.placeslots}" id="placeslots">
<p:column headerText="#{i18n['placeslot.id']}">
<h:outputText value="#{slot.id}" />
</p:column>
<p:column headerText="#{i18n['placeslot.state']}">
<h:outputText value="#{slot.bill.expired ? i18n['placeslot.state.expired'] : ( slot.bill.paid ? i18n['placeslot.state.paid'] : i18n['placeslot.state.notPaid'])}" />
</p:column>
<p:column headerText="#{i18n['placeslot.product']}">
<h:outputText value="#{slot.product.name}" />
</p:column>
<p:column headerText="#{i18n['placeslot.place']}">
<h:outputText rendered="#{!empty slot.place}" value="#{slot.place.name}" />
</p:column>
<p:column headerText="#{i18n['placeslot.used']}">
<h:outputText value="#{slot.used}">
<f:convertDateTime timeZone="#{sessionHandler.timezone}" pattern="#{sessionHandler.shortDatetimeFormat}" />
</h:outputText>
</p:column>
<p:column headerText="#{i18n['placeslot.bill']}">
<h:link outcome="/bill/showBill" value="#{i18n['bill.billNumber']}: #{slot.bill.id}">
<f:param name="billid" value="#{slot.bill.id}" />
</h:link>
</p:column>
<p:column >
<p:commandButton rendered="#{empty slot.place and empty slot.used}" value="#{i18n['placeslot.lockSlot']}" actionListener="#{placeGroupView.lockSlot}" update="placeslots" />
<p:commandButton rendered="#{empty slot.place and not empty slot.used}" value="#{i18n['placeslot.releaseSlot']}" actionListener="#{placeGroupView.releaseSlot}" update="placeslots" />
</p:column>
</p:dataTable>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>