1 <?xml version='
1.0' encoding='UTF-
8'
?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml"
4 xmlns:
h=
"http://java.sun.com/jsf/html"
5 xmlns:
f=
"http://java.sun.com/jsf/core"
6 xmlns:
ui=
"http://java.sun.com/jsf/facelets"
7 xmlns:
p=
"http://primefaces.prime.com.tr/ui">
10 <ui:composition template=
"./WEB-INF/skiSchoolTemplate.xhtml">
11 <ui:param name=
"pageTitle" value=
"#{msgs.site_timetable}" />
12 <ui:define name=
"content">
14 <p:growl id=
"growl" showDetail=
"true"/>
16 <h:form id=
"calendar" rendered=
"#{securityBean.inRoleAdministrator}">
17 <h:panelGrid columns=
"4">
18 <p:commandLink value=
"yesterday" actionListener=
"#{timetableBean.goYesterday}" update=
"date, timetable" styleClass=
"ui-icon ui-icon-carat-1-w"/>
19 <h:outputText value=
"#{timetableBean.date}" id=
"date">
20 <f:convertDateTime pattern=
"dd. MM. yyyy"
23 <p:commandLink value=
"tomorrow" actionListener=
"#{timetableBean.goTomorrow}" update=
"date, timetable" styleClass=
"ui-icon ui-icon-carat-1-e"/>
24 <p:commandLink value=
"#{msgs.timetable_today}" actionListener=
"#{timetableBean.goToday}" update=
"date, timetable"/>
28 <h:form id=
"timetable" rendered=
"#{securityBean.inRoleAdministrator}">
29 <p:dataTable value=
"#{timetableBean.availableInstructors}" var=
"instructor">
31 <f:facet name=
"header">
32 <h:outputText value=
"#{msgs.global_instructor}"/>
34 <f:facet name=
"footer">
35 <h:outputText value=
"#{msgs.timetable_other}"/>
37 <h:outputText value=
"#{instructor.firstName} #{instructor.lastName}"/>
40 <f:facet name=
"header">
41 <span class=
"timeline">8 -
9</span>
42 <span class=
"timeline">9 -
10</span>
43 <span class=
"timeline">10 -
11</span>
44 <span class=
"timeline">11 -
12</span>
45 <span class=
"timeline">12 -
13</span>
46 <span class=
"timeline">13 -
14</span>
47 <span class=
"timeline">14 -
15</span>
48 <span class=
"timeline">15 -
16</span>
49 <span class=
"timeline">16 -
17</span>
50 <span class=
"timeline">17 -
18</span>
51 <span class=
"timeline">18 -
19</span>
52 <span class=
"timeline">19 -
20</span>
53 <span class=
"timeline">20 -
21</span>
55 <f:facet name=
"footer">
56 <span class=
"timeline"><p:commandLink value=
"08" action=
"#{timetableBean.newFreeLesson(8)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
57 <span class=
"timeline"><p:commandLink value=
"09" action=
"#{timetableBean.newFreeLesson(9)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
58 <span class=
"timeline"><p:commandLink value=
"10" action=
"#{timetableBean.newFreeLesson(10)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
59 <span class=
"timeline"><p:commandLink value=
"11" action=
"#{timetableBean.newFreeLesson(11)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
60 <span class=
"timeline"><p:commandLink value=
"12" action=
"#{timetableBean.newFreeLesson(12)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
61 <span class=
"timeline"><p:commandLink value=
"13" action=
"#{timetableBean.newFreeLesson(13)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
62 <span class=
"timeline"><p:commandLink value=
"14" action=
"#{timetableBean.newFreeLesson(14)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
63 <span class=
"timeline"><p:commandLink value=
"15" action=
"#{timetableBean.newFreeLesson(15)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
64 <span class=
"timeline"><p:commandLink value=
"16" action=
"#{timetableBean.newFreeLesson(16)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
65 <span class=
"timeline"><p:commandLink value=
"17" action=
"#{timetableBean.newFreeLesson(17)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
66 <span class=
"timeline"><p:commandLink value=
"18" action=
"#{timetableBean.newFreeLesson(18)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
67 <span class=
"timeline"><p:commandLink value=
"19" action=
"#{timetableBean.newFreeLesson(19)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
68 <span class=
"timeline"><p:commandLink value=
"20" action=
"#{timetableBean.newFreeLesson(20)}" oncomplete=
"createLessonDialog.show()" update=
"createLesson" styleClass=
"ui-icon ui-icon-plusthick"/></span>
70 <ui:repeat value=
"#{timetableBean.createTimeBars(instructor)}" var=
"bar">
71 <p:commandLink action=
"#{timetableBean.newLesson(bar.content)}"
72 oncomplete=
"createLessonDialog.show()"
75 style=
"margin-left: #{bar.left}px; width: #{bar.width}px; background-color: #{bar.content.color()};"
76 title=
"#{bar.content.title()}"
77 rendered=
"#{bar.content.isAvailability()}">
79 <h:outputText value=
"#{bar.content.startTime}"
80 rendered=
"#{timetableBean.displayedTime(bar.width)}">
81 <f:convertDateTime pattern=
"HH"
85 <h:outputText value=
"#{bar.content.startTime}"
86 rendered=
"#{timetableBean.displayedTime(bar.width)}">
87 <f:convertDateTime pattern=
"mm"
91 <h:outputText value=
" - "
92 rendered=
"#{timetableBean.displayedTime(bar.width)}"/>
93 <h:outputText value=
"#{bar.content.endTime}"
94 rendered=
"#{timetableBean.displayedTime(bar.width)}">
95 <f:convertDateTime pattern=
"HH"
99 <h:outputText value=
"#{bar.content.endTime}"
100 rendered=
"#{timetableBean.displayedTime(bar.width)}">
101 <f:convertDateTime pattern=
"mm"
105 <h:outputText value=
"..."
106 rendered=
"#{!timetableBean.displayedTime(bar.width)}"/>
109 <p:commandLink action=
"#{timetableBean.setLesson(bar.content)}"
110 oncomplete=
"updateLessonDialog.show()"
111 update=
"updateLesson"
113 style=
"margin-left: #{bar.left}px; width: #{bar.width}px; background-color: #{bar.content.color()};"
114 title=
"#{bar.content.title()}"
115 rendered=
"#{bar.content.isLesson()}">
117 <h:outputText value=
"#{bar.content.startTime}"
118 rendered=
"#{timetableBean.displayedTime(bar.width)}">
119 <f:convertDateTime pattern=
"HH"
123 <h:outputText value=
"#{bar.content.startTime}"
124 rendered=
"#{timetableBean.displayedTime(bar.width)}">
125 <f:convertDateTime pattern=
"mm"
129 <h:outputText value=
" - "
130 rendered=
"#{timetableBean.displayedTime(bar.width)}"/>
131 <h:outputText value=
"#{bar.content.endTime}"
132 rendered=
"#{timetableBean.displayedTime(bar.width)}">
133 <f:convertDateTime pattern=
"HH"
137 <h:outputText value=
"#{bar.content.endTime}"
138 rendered=
"#{timetableBean.displayedTime(bar.width)}">
139 <f:convertDateTime pattern=
"mm"
143 <h:outputText value=
"..."
144 rendered=
"#{!timetableBean.displayedTime(bar.width)}"/>
150 <p:panel style=
"margin-top: 10px;margin-right: 600px">
151 <h:panelGrid columns=
"2">
152 <h:outputText style=
"background-color: #FFA500;padding-left: 50px" value=
":"/>
153 <h:outputText value=
"#{msgs.lesson_standardlessons}"/>
154 <h:outputText style=
"background-color: #FF4500;padding-left: 50px" value=
":"/>
155 <h:outputText value=
"#{msgs.lesson_kindergartenlessons}"/>
156 <h:outputText style=
"background-color:lightgreen ;padding-left: 50px" value=
":"/>
157 <h:outputText value=
"#{msgs.global_availability}"/>
160 <p:panel style=
"margin-right: 400px">
161 <h:panelGrid columns=
"1">
162 <h:outputText value=
"Zmeny:"/>
163 <h:outputText value=
"- nie je nutné prvé meno keď sa vytvára nový žiak"/>
164 <h:outputText value=
"- zmena počítania hodín"/>
165 <h:outputText value=
"- automatické dopĺňanie, nezáleži na veľkosti písmen"/>
166 <h:outputText value=
"- inštruktori a žiaci zoradení podľa abecedy"/>
167 <h:outputText value=
"- nové filtrovanie v tabuľke hodín"/>
168 <h:outputText value=
"- pop up kalendáre po slovensky so začiatkom v pondelok"/>
175 <p:dialog header=
"#{msgs.timetable_createlesson}"
176 widgetVar=
"createLessonDialog"
179 onCloseUpdate=
"timetable"
180 onShow=
"PrimeFaces.ajax.AjaxRequest('/SkiSchool-war/timetable.xhtml',{formId:'createLesson'},{'javax.faces.partial.render':'createLesson'});">
181 <h:form id=
"createLesson">
183 <h:panelGrid columns=
"3">
184 <h:outputText value=
"#{msgs.global_date}"/>
185 <h:outputText value=
"#{timetableBean.lesson.startTime}" id=
"date">
186 <f:convertDateTime pattern=
"dd. MM. yyyy"
189 <p:message for=
"date"/>
191 <h:outputText value=
"#{msgs.global_starttime}*"/>
192 <p:spinner value=
"#{timetableBean.startHour}" min=
"#{timetableBean.availabilityStartHour}" max=
"#{timetableBean.availabilityEndHour}" stepFactor=
"1" size=
"5"/>
193 <p:spinner value=
"#{timetableBean.startMinute}" min=
"0" max=
"45" stepFactor=
"15" size=
"5"/>
195 <h:outputText value=
"#{msgs.global_endtime}*"/>
196 <p:spinner value=
"#{timetableBean.endHour}" min=
"#{timetableBean.availabilityStartHour}" max=
"#{timetableBean.availabilityEndHour}" stepFactor=
"1" size=
"5"/>
197 <p:spinner value=
"#{timetableBean.endMinute}" min=
"0" max=
"45" stepFactor=
"15" size=
"5"/>
202 <h:panelGrid columns=
"3">
203 <h:outputText value=
"#{msgs.global_instructor}*"/>
204 <p:autoComplete value=
"#{timetableBean.selectedInstructor}"
205 completeMethod=
"#{timetableBean.completeInstructor}"
207 itemLabel=
"#{instructor.firstName} #{instructor.lastName}"
208 itemValue=
"#{instructor}"
209 converter=
"instructor"
210 rendered=
"#{timetableBean.freeLesson}"
212 <h:outputText value=
"#{timetableBean.selectedInstructor.firstName} #{timetableBean.selectedInstructor.lastName}"
213 rendered=
"#{not timetableBean.freeLesson}"/>
214 <p:message for=
"instructor"/>
216 <h:outputText value=
"#{msgs.global_student}*"/>
217 <p:autoComplete value=
"#{timetableBean.selectedStudent}"
218 completeMethod=
"#{timetableBean.completeStudent}"
220 itemLabel=
"#{student.firstName} #{student.lastName}"
221 itemValue=
"#{student}"
224 <p:commandButton value=
"#{msgs.global_createstudent}" actionListener=
"#{timetableBean.createNewStudent}" update=
"createLesson, growl"/>
226 <h:outputText value=
"#{msgs.lesson_groupsize}*"/>
227 <p:spinner value=
"#{timetableBean.groupSize}" min=
"1" stepFactor=
"1" size=
"5" id=
"groupSize"/>
228 <p:message for=
"groupSize"/>
232 <p:panel footer=
"* #{msgs.global_required}">
233 <h:panelGrid columns=
"3">
234 <h:outputText value=
"#{msgs.lesson_equipment}*"/>
235 <h:selectOneRadio value=
"#{timetableBean.lesson.snowboard}" id=
"snowboard">
236 <f:selectItem itemValue=
"false" itemLabel=
"#{msgs.timetable_ski}"/>
237 <f:selectItem itemValue=
"true" itemLabel=
"#{msgs.timetable_snb}"/>
239 <p:message for=
"snowboard"/>
241 <h:outputText value=
"#{msgs.global_note}"/>
242 <h:inputText value=
"#{timetableBean.lesson.note}" id=
"note"/>
243 <p:message for=
"note"/>
249 <h:panelGrid columns=
"2">
250 <p:commandButton value=
"#{msgs.timetable_createlesson}" actionListener=
"#{timetableBean.createLesson}" update=
"createLesson, growl" id=
"submit"/>
251 <p:commandButton value=
"#{msgs.global_close}" onclick=
"createLessonDialog.hide()" update=
"timetable"/>
256 <p:dialog header=
"#{msgs.timetable_updatelesson}"
257 widgetVar=
"updateLessonDialog"
260 onCloseUpdate=
"timetable">
261 <h:form id=
"updateLesson">
263 <h:panelGrid columns=
"2">
264 <h:outputText value=
"#{msgs.global_date}:"/>
265 <h:outputText value=
"#{timetableBean.lesson.startTime}">
266 <f:convertDateTime pattern=
"dd. MM. yyyy"
270 <h:outputText value=
"#{msgs.global_time}:"/>
272 <h:outputText value=
"#{timetableBean.lesson.startTime}">
273 <f:convertDateTime pattern=
"HH:mm"
276 <h:outputText value=
" - "/>
277 <h:outputText value=
"#{timetableBean.lesson.endTime}">
278 <f:convertDateTime pattern=
"HH:mm"
283 <h:outputText value=
"#{msgs.lesson_lessontype}:"/>
284 <h:outputText value=
"#{timetableBean.lesson.lessonType}"/>
286 <h:outputText value=
"#{msgs.global_instructors}:"/>
287 <h:dataTable value=
"#{timetableBean.lesson.instructors}" var=
"instructor">
289 <h:outputText value=
"#{instructor.firstName} #{instructor.lastName}"/>
293 <h:outputText value=
"#{msgs.global_students}:"/>
294 <h:dataTable value=
"#{timetableBean.lesson.students}" var=
"student">
296 <h:outputText value=
"#{student.firstName} #{student.lastName}"/>
303 <h:panelGrid columns=
"2">
304 <h:outputText value=
"#{msgs.lesson_lessonexecuted}:"/>
305 <h:selectBooleanCheckbox value=
"#{timetableBean.lesson.executed}"/>
307 <h:outputText value=
"#{msgs.lesson_lessonpaid}:"/>
308 <h:selectBooleanCheckbox value=
"#{timetableBean.lesson.paid}"/>
314 <h:panelGrid columns=
"3">
315 <p:commandButton value=
"#{msgs.global_save}" actionListener=
"#{timetableBean.updateLesson}" update=
"updateLesson, growl" id=
"submit2"/>
316 <p:commandButton value=
"#{msgs.timetable_deletelesson}" actionListener=
"#{timetableBean.deleteLesson}" update=
"updateLesson, growl" id=
"submit3"/>
317 <p:commandButton value=
"#{msgs.global_close}" onclick=
"updateLessonDialog.hide()" update=
"timetable"/>