manageParticipants.xhtml 3.73 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.template}">
		<f:metadata>
			<f:viewParam name="lectureid" value="#{lectureReportsView.lectureId}" />
			<f:event type="preRenderView" listener="#{lectureReportsView.initView()}" />
		</f:metadata>

		<ui:define rendered="#{lectureReportsView.lectureGroupsVisible}" name="title">
			<h1>#{i18n['manageparticipants.title']}</h1>
		</ui:define>

		<ui:define name="content">

			<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
				<p:commandButton value="#{i18n['yes']}" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
				<p:commandButton value="#{i18n['no']}" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
			</p:confirmDialog>

			<p:fieldset legend="#{lectureReportsView.currentLecture.name}">
				<p:panelGrid columns="2">
					<p:outputLabel value="#{i18n['lecture.description']}" />
					<h:outputText value="#{lectureReportsView.currentLecture.description}" />

					<p:outputLabel value="#{i18n['lecture.startTime']}" />
					<h:outputText value="#{lectureReportsView.currentLecture.startTime}" pattern="#{sessionHandler.datetimeFormat}">
						<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
					</h:outputText>

					<p:outputLabel value="#{i18n['lecture.hours']}" />
					<h:outputText value="#{lectureReportsView.currentLecture.hours}" />

					<p:outputLabel value="#{i18n['lecture.participants']}" />
					<h:outputText id="participants_count" value="#{lectureReportsView.currentLecture.participantsCount} / #{lectureReportsView.currentLecture.maxParticipantsCount}" />

				</p:panelGrid>
			</p:fieldset>
			<br />
			<br />
			<br />
			<br />
			<h:form id="manageParticipants">
				<p:dataTable id="participants" value="#{lectureReportsView.currentLecture.participants}" var="user">
					<p:column>
						<h:outputText value="#{user.user.nick}" />
					</p:column>
					<p:column>
						<h:outputText value="#{user.user.lastname}" />
					</p:column>
					<p:column>
						<h:outputText value="#{user.user.firstnames}" />
					</p:column>
					<p:column>
						<p:commandButton value="#{i18n['lecture.unparticipate']}" actionListener="#{lectureReportsView.unParticipateCurrent}" update="participants :participants_count" onerror="location.reload(true)">
							<f:attribute name="userid" value="#{user.id}" />
							<p:confirm header="#{i18n['lecture.unparticipate.confirm.title']}" message="#{i18n['lecture.unparticipate.confirm.message']}" icon="ui-icon-alert" />
						</p:commandButton>
					</p:column>
				</p:dataTable>
			</h:form>
			<br />
			<br />
			<br />
			<br />
			<h:form>

				<p:fieldset styleClass="no_print" legend="#{i18n['manageparticipants.addUser']}">
					<p:autoComplete size="55" id="multiuser" value="#{lectureReportsView.multiSearchUser}" completeMethod="#{lectureReportsView.matchMulti}" converter="#{eventUserConverter}" var="usrx" itemLabel="#{usrx.shortUserDescriptor}" itemValue="#{usrx}">
						<p:ajax event="itemSelect" listener="#{lectureReportsView.addUserToLecture}" update=":manageParticipants:participants multiuser :participants_count" />
					</p:autoComplete>
				</p:fieldset>

			</h:form>
			<br />
			<br />
			<br />
			<br />

		</ui:define>




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