manageLectures.xhtml
4.02 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
<!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>