list.xhtml
5.74 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!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:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<f:metadata>
<f:viewParam name="page" value="#{userSearchView.page}" />
<f:viewParam name="pagesize" value="#{userSearchView.pagesize}" />
<f:viewParam name="sort" value="#{userSearchView.sort}" />
<f:viewParam name="search" value="#{userSearchView.search}" />
<f:event type="preRenderView" listener="#{userSearchView.initView}" />
</f:metadata>
<ui:define name="content">
<h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
<h1>#{i18n['userlist.header']}</h1>
<h:form id="pageform" styleClass="useradmin_list">
<!-- This is here, so that pressing enter works correctly. -->
<p:commandButton style="display: none;" action="#{userSearchView.newSearch()}" ajax="false" />
<p:panelGrid style="width: 100%;">
<p:row>
<p:column>
<p:commandButton onclick="$('#advancedSearch').toggle(); return false;" value="#{i18n['userlist.showAdvancedSearch']}" ajax="false" />
<div id="advancedSearch" style="display: none;">
<p:selectManyCheckbox layout="pageDirection" styleClass="nowrap" id="rolefilter" value="#{userSearchView.searchQuery.filterRoles}" converter="#{roleConverter}">
<f:selectItems value="#{roleDataView.roleList}" var="r" itemLabel="#{r.name}" />
</p:selectManyCheckbox>
<h3>
<h:outputText value="#{i18n['userlist.cardfilter']}" />
</h3>
<p:selectManyCheckbox id="cardstatusfilter" layout="pageDirection" styleClass="nowrap" value="#{userSearchView.searchQuery.hasCardState}" converter="#{cardStateConverter}">
<f:selectItems value="#{userSearchView.searchQuery.cardStates}" var="r" itemLabel="#{r}" />
</p:selectManyCheckbox>
<h3>Muut</h3>
<p:selectBooleanCheckbox id="placeassoc" value="#{userSearchView.searchQuery.placeAssoc}" />
<p:outputLabel for="placeassoc" value="#{i18n['userlist.placeassoc']}" />
<br />
<p:outputLabel for="saldofilter" value="#{i18n['userlist.saldofilter']}" />
<h:selectOneMenu id="saldofilter" value="#{userSearchView.searchQuery.accountSaldoCompare}">
<f:selectItems value="#{userSearchView.searchQuery.accountCompareValues}" />
</h:selectOneMenu>
<p:inputText value="#{userSearchView.searchQuery.accountSaldo}">
<f:convertNumber minFractionDigits="0" maxFractionDigits="2" />
</p:inputText>
<br />
<p:selectBooleanCheckbox id="onlythisevent" value="#{userSearchView.searchQuery.onlyThisEvent}" />
<p:outputLabel for="onlythisevent" value="#{i18n['userlist.onlythisevent']}" />
<br />
<p:selectBooleanCheckbox id="userswithunusedcodes" value="#{userSearchView.searchQuery.usersWithUnusedCodes}" />
<p:outputLabel for="userswithunusedcodes" value="#{i18n['userlist.usersWithUnusedCodes']}" />
<br />
<p:selectBooleanCheckbox id="usersWithUnusedPlaceslots" value="#{userSearchView.searchQuery.usersWithUnusedPlaceslots}" />
<p:outputLabel for="usersWithUnusedPlaceslots" value="#{i18n['userlist.usersWithUnusedPlaceslots']}" />
</div>
<br />
</p:column>
<p:column>
<!-- <a id="show_user_cart" style="display: #{((userCartView.isEmpty())?'block':'none')};" onclick="$('#pageform\\:usercart').slideToggle(300);"><h:outputText value="#{i18n['usercart.showCart']}" /></a> -->
<p:commandButton onclick="$('#pageform\\:usercart').toggle(); return false;" value="#{i18n['usercart.showCart']}" ajax="false" />
<p:panelGrid columns="1" id="usercart" styleClass="noborderTable" style="display: #{((userCartView.isEmpty())?'none':'block')};">
<p:commandButton actionListener="#{userSearchView.addToCart}" value="#{i18n['usercart.addSearchedUsers']}" ajax="false" />
<h:panelGroup>
<h:outputText value="#{i18n['usercart.cartsize']} #{userCartView.userCartSize}" />
<p:commandButton action="#{userCartView.clearCart()}" value="#{i18n['usercart.clear']}" ajax="false" />
</h:panelGroup>
<p:commandButton action="#{userCartView.traverse}" value="#{i18n['usercart.traverse']}" ajax="false" />
<p:commandButton value="#{i18n['usercart.downloadCsv']}" ajax="false">
<p:fileDownload value="#{userCartView.downloadCsv}" />
</p:commandButton>
<p:commandButton value="#{i18n['usercart.downloadExport']}" ajax="false">
<p:fileDownload value="#{userCartView.userExport}" />
</p:commandButton>
<p:commandButton action="#{userCartView.showOverview()}" value="#{i18n['usercart.showoverview']}" ajax="false" />
<p:commandButton rendered="#{creditTransferView.transferPermissions}" action="#{userCartView.transferCredits}" value="#{i18n['usercart.transferCredits']}" ajax="false" />
</p:panelGrid>
</p:column>
</p:row>
<p:row>
<p:column colspan="2">
<p:inputText value="#{userSearchView.search}" />
<p:commandButton value="#{i18n['userlist.search']}" action="#{userSearchView.newSearch()}" ajax="false" />
</p:column>
</p:row>
</p:panelGrid>
</h:form>
<p>
<users:list rendered="#{!userSearchView.searchQuery.onlyThisEvent}" />
<users:eventuserlist rendered="#{userSearchView.searchQuery.onlyThisEvent}" />
</p>
</ui:define>
</ui:composition>
</h:body>
</html>