manageLectures.xhtml 4.02 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="lecturegroupid" value="#{lectureView.lectureGroupId}" />
			<f:event type="preRenderView" listener="#{lectureView.initView()}" />
		</f:metadata>

		<ui:define name="title">
			<h1>#{i18n['lecturegroup.list.title']}</h1>
		</ui:define>

		<ui:define name="content">

			<h:form id="managelectures">

				<p:fieldset legend="#{lectureView.currentLectureGroup.name}" id="lectures">
					<p:dataTable var="lecture" value="#{lectureView.lectures}">
						<p:column headerText="#{i18n['lecture.name']}">
							<h:outputText value="#{lecture.name}" />
						</p:column>
						<p:column headerText="#{i18n['lecture.description']}">
							<h:outputText value="#{lecture.description}" />
						</p:column>
						<p:column headerText="#{i18n['lecture.maxParticipantsCount']}">
							<h:outputText value="#{lecture.maxParticipantsCount}" />
						</p:column>
						<p:column headerText="#{i18n['lecture.hours']}">
							<h:outputText value="#{lecture.hours}" />
						</p:column>
						
						<p:column headerText="#{i18n['lecture.startTime']}">
							<h:outputText value="#{lecture.startTime}">
								<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
							</h:outputText>
						</p:column>
						
						<p:column>
							<p:commandButton value="#{i18n['edit']}" actionListener="#{lectureView.editCurrent}" update=":managelectures:editcreate" />
						</p:column>
					</p:dataTable>
				</p:fieldset>
				<p:commandButton value="#{i18n['lecture.createNew']}" actionListener="#{lectureView.createNew}" update=":managelectures:editcreate" /> 
				<p:outputLabel value="#{i18n['lecture.multicreate']}" /> <p:selectBooleanButton value="#{lectureView.multicreate}" offLabel="#{i18n['off']}" onLabel="#{i18n['on']}" onIcon="ui-icon-check" offIcon="ui-icon-close" /> 

	
				<br />
				<br />
				<br />
				<p:fieldset legend="#{lectureView.editPanelTitle}" id="editcreate">
					<p:panelGrid columns="2">
						<p:outputLabel value="#{i18n['lecture.name']}" />
						<p:inputText value="#{lectureView.currentLecture.name}" />

						<p:outputLabel value="#{i18n['lecture.description']}" />
						<p:inputTextarea value="#{lectureView.currentLecture.description}" />
						
						<p:outputLabel value="#{i18n['lecture.maxParticipantsCount']}" />
						<p:inputText value="#{lectureView.currentLecture.maxParticipantsCount}" />
						
						<p:outputLabel value="#{i18n['lecture.startTime']}" />
						<p:calendar value="#{lectureView.currentLecture.startTime}" pattern="#{sessionHandler.datetimeFormat}"  showOn="button" />
						
						<p:outputLabel value="#{i18n['lecture.hours']}" />
						<p:inputText value="#{lectureView.currentLecture.hours}" />
						
						
						<p:outputLabel value="#{i18n['lecture.roles']}" />
						<h:selectManyCheckbox converter="#{roleConverter}"  layout="pageDirection" id="roles" value="#{lectureView.currentLecture.openForRoles}">
							<f:selectItems var="roleitem" itemLabel="#{roleitem.name}" value="#{roleDataView.roles}" />
						</h:selectManyCheckbox>
						
						<p:commandButton rendered="#{!lectureView.creatingLecture}" actionListener="#{lectureView.saveLecture}" value="#{i18n['save']}" update="editcreate :managelectures:lectures" />
						<p:commandButton rendered="#{lectureView.creatingLecture}" actionListener="#{lectureView.saveLecture}" value="#{i18n['create']}" update="editcreate :managelectures:lectures" />

					</p:panelGrid>
				</p:fieldset>

			</h:form>





		</ui:define>




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