list.xhtml 5.14 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: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 styleClass="useradmin_list">

				<h:panelGrid columns="2">
					<h:panelGroup>
						<a id="show_advanced_search"><h:outputText value="#{i18n['userlist.showAdvancedSearch']}" /></a>
						<div id="advancedSearch" style="display: none;">
							<h:selectBooleanCheckbox id="placeassoc" value="#{userSearchView.searchQuery.placeAssoc}" />
							<h:outputLabel for="placeassoc" value="#{i18n['userlist.placeassoc']}" />
							<br />
							<h:outputLabel for="saldofilter" value="#{i18n['userlist.saldofilter']}" />
							<h:selectOneMenu value="#{userSearchView.searchQuery.accountSaldoCompare}">
								<f:selectItems value="#{userSearchView.searchQuery.accountCompareValues}" />
							</h:selectOneMenu>

							<h:inputText value="#{userSearchView.searchQuery.accountSaldo}">
								<f:convertNumber minFractionDigits="0" maxFractionDigits="2" />
							</h:inputText>
							<br /><br />
							<!-- 
							<br /> 
							<h:outputLabel for="rolefilter" value="#{i18n['userlist.rolefilter']}" /> 
							<h:selectManyCheckbox layout="pageDirection" styleClass="nowrap" id="rolefilter"
								value="#{userSearchView.searchQuery.filterRoles}" converter="#{roleConverter}">
							</h:inputText>
							-->

							<strong><h:outputLabel for="rolefilter" value="#{i18n['userlist.rolefilter']}" /></strong><br />
							<h:selectManyCheckbox layout="pageDirection" styleClass="nowrap" id="rolefilter" value="#{userSearchView.searchQuery.filterRoles}" converter="#{roleConverter}">
								<f:selectItems value="#{roleDataView.roles}" var="r" itemLabel="#{r.name}" />
							</h:selectManyCheckbox>

							<h:outputLabel for="cardstatusfilter" value="#{i18n['userlist.cardfilter']}" />
							<h:selectManyCheckbox layout="pageDirection" styleClass="nowrap" id="cardfilter" value="#{userSearchView.searchQuery.hasCardState}" converter="#{cardStateConverter}">
								<f:selectItems value="#{userSearchView.searchQuery.cardStates}" var="r" itemLabel="#{r}" />
							</h:selectManyCheckbox>

						</div>
						<br />

						<h:selectBooleanCheckbox id="onlythisevent" value="#{userSearchView.searchQuery.onlyThisEvent}" />
						<h:outputLabel for="onlythisevent" value="#{i18n['userlist.onlythisevent']}" />
						<br />

						<h:selectBooleanCheckbox id="userswithunusedcodes" value="#{userSearchView.searchQuery.usersWithUnusedCodes}"  />
						<h:outputLabel for="userswithunusedcodes" value="#{i18n['userlist.usersWithUnusedCodes']}" />
						<br />

						<h:inputText value="#{userSearchView.search}" />
						<h:commandButton value="#{i18n['userlist.search']}" action="#{userSearchView.newSearch()}" />
					</h:panelGroup>
					<h:panelGroup>
						<a id="show_user_cart" onclick="$('#pageform\\:usercart').slideToggle(300);"><h:outputText value="#{i18n['usercart.showCart']}" /></a>

						<p:panelGrid columns="1" id="usercart" styleClass="noborderTable" style="display:none;">
							<h:commandButton actionListener="#{userSearchView.addToCart}" value="#{i18n['usercart.addSearchedUsers']}" />
							<h:panelGroup>
								<h:outputText value="#{i18n['usercart.cartsize']} #{userCartView.userCartSize}" />
								<h:commandButton action="#{userCartView.clearCart()}" value="#{i18n['usercart.clear']}" />
							</h:panelGroup>
							<h:commandButton action="#{userCartView.traverse}" value="#{i18n['usercart.traverse']}" />
							<h:commandButton value="#{i18n['usercart.downloadCsv']}">
								<p:fileDownload value="#{userCartView.downloadCsv}" />
							</h:commandButton>
							<h:commandButton value="#{i18n['usercart.downloadExport']}">
								<p:fileDownload value="#{userCartView.userExport}" />
							</h:commandButton>
							<h:commandButton action="#{userCartView.showOverview()}" value="#{i18n['usercart.showoverview']}" />

							<h:commandButton rendered="#{creditTransferView.transferPermissions}" action="#{userCartView.transferCredits}" value="#{i18n['usercart.transferCredits']}" />

						</p:panelGrid>
					</h:panelGroup>
				</h:panelGrid>
			</h:form>
			<p>
				<users:list rendered="#{!userSearchView.searchQuery.onlyThisEvent}" />
				<users:eventuserlist rendered="#{userSearchView.searchQuery.onlyThisEvent}" />
			</p>

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