manageParticipants.xhtml
3.73 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
<!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>