Step back in refactoring, case sensitive ignored in autocomplite, adding lesson type...
[SkiSchool.git] / SkiSchool-war / web / timetable.xhtml
blobbc028d1c258c57fd9f2de3398b3791c95f6cfbc0
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">
8 <body>
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"
21 timeZone="GMT+1"/>
22 </h:outputText>
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"/>
25 </h:panelGrid>
26 </h:form>
28 <h:form id="timetable" rendered="#{securityBean.inRoleAdministrator}">
29 <p:dataTable value="#{timetableBean.availableInstructors}" var="instructor">
30 <p:column>
31 <f:facet name="header">
32 <h:outputText value="#{msgs.global_instructor}"/>
33 </f:facet>
34 <f:facet name="footer">
35 <h:outputText value="#{msgs.timetable_other}"/>
36 </f:facet>
37 <h:outputText value="#{instructor.firstName} #{instructor.lastName}"/>
38 </p:column>
39 <p:column>
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>
54 </f:facet>
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>
69 </f:facet>
70 <ui:repeat value="#{timetableBean.createTimeBars(instructor)}" var="bar">
71 <p:commandLink action="#{timetableBean.newLesson(bar.content)}"
72 oncomplete="createLessonDialog.show()"
73 update="createLesson"
74 styleClass="timeBar"
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"
82 timeZone="GMT+1"/>
83 </h:outputText>
84 <sup>
85 <h:outputText value="#{bar.content.startTime}"
86 rendered="#{timetableBean.displayedTime(bar.width)}">
87 <f:convertDateTime pattern="mm"
88 timeZone="GMT+1"/>
89 </h:outputText>
90 </sup>
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"
96 timeZone="GMT+1"/>
97 </h:outputText>
98 <sup>
99 <h:outputText value="#{bar.content.endTime}"
100 rendered="#{timetableBean.displayedTime(bar.width)}">
101 <f:convertDateTime pattern="mm"
102 timeZone="GMT+1"/>
103 </h:outputText>
104 </sup>
105 <h:outputText value="..."
106 rendered="#{!timetableBean.displayedTime(bar.width)}"/>
108 </p:commandLink>
109 <p:commandLink action="#{timetableBean.setLesson(bar.content)}"
110 oncomplete="updateLessonDialog.show()"
111 update="updateLesson"
112 styleClass="timeBar"
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"
120 timeZone="GMT+1"/>
121 </h:outputText>
122 <sup>
123 <h:outputText value="#{bar.content.startTime}"
124 rendered="#{timetableBean.displayedTime(bar.width)}">
125 <f:convertDateTime pattern="mm"
126 timeZone="GMT+1"/>
127 </h:outputText>
128 </sup>
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"
134 timeZone="GMT+1"/>
135 </h:outputText>
136 <sup>
137 <h:outputText value="#{bar.content.endTime}"
138 rendered="#{timetableBean.displayedTime(bar.width)}">
139 <f:convertDateTime pattern="mm"
140 timeZone="GMT+1"/>
141 </h:outputText>
142 </sup>
143 <h:outputText value="..."
144 rendered="#{!timetableBean.displayedTime(bar.width)}"/>
146 </p:commandLink>
147 </ui:repeat>
148 </p:column>
149 </p:dataTable>
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}"/>
158 </h:panelGrid>
159 </p:panel>
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"/>
169 </h:panelGrid>
170 </p:panel>
171 </h:form>
175 <p:dialog header="#{msgs.timetable_createlesson}"
176 widgetVar="createLessonDialog"
177 modal="true"
178 width="450"
179 onCloseUpdate="timetable"
180 onShow="PrimeFaces.ajax.AjaxRequest('/SkiSchool-war/timetable.xhtml',{formId:'createLesson'},{'javax.faces.partial.render':'createLesson'});">
181 <h:form id="createLesson">
182 <p:panel>
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"
187 timeZone="GMT+1"/>
188 </h:outputText>
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"/>
198 </h:panelGrid>
199 </p:panel>
201 <p:panel>
202 <h:panelGrid columns="3">
203 <h:outputText value="#{msgs.global_instructor}*"/>
204 <p:autoComplete value="#{timetableBean.selectedInstructor}"
205 completeMethod="#{timetableBean.completeInstructor}"
206 var="instructor"
207 itemLabel="#{instructor.firstName} #{instructor.lastName}"
208 itemValue="#{instructor}"
209 converter="instructor"
210 rendered="#{timetableBean.freeLesson}"
211 id="instructor"/>
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}"
219 var="student"
220 itemLabel="#{student.firstName} #{student.lastName}"
221 itemValue="#{student}"
222 converter="student"
223 id="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"/>
229 </h:panelGrid>
230 </p:panel>
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}"/>
238 </h:selectOneRadio>
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"/>
244 </h:panelGrid>
245 </p:panel>
247 <p:messages/>
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"/>
252 </h:panelGrid>
253 </h:form>
254 </p:dialog>
256 <p:dialog header="#{msgs.timetable_updatelesson}"
257 widgetVar="updateLessonDialog"
258 modal="true"
259 width="450"
260 onCloseUpdate="timetable">
261 <h:form id="updateLesson">
262 <p:panel>
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"
267 timeZone="GMT+1"/>
268 </h:outputText>
270 <h:outputText value="#{msgs.global_time}:"/>
271 <h:panelGroup>
272 <h:outputText value="#{timetableBean.lesson.startTime}">
273 <f:convertDateTime pattern="HH:mm"
274 timeZone="GMT+1"/>
275 </h:outputText>
276 <h:outputText value=" - "/>
277 <h:outputText value="#{timetableBean.lesson.endTime}">
278 <f:convertDateTime pattern="HH:mm"
279 timeZone="GMT+1"/>
280 </h:outputText>
281 </h:panelGroup>
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">
288 <h:column>
289 <h:outputText value="#{instructor.firstName} #{instructor.lastName}"/>
290 </h:column>
291 </h:dataTable>
293 <h:outputText value="#{msgs.global_students}:"/>
294 <h:dataTable value="#{timetableBean.lesson.students}" var="student">
295 <h:column>
296 <h:outputText value="#{student.firstName} #{student.lastName}"/>
297 </h:column>
298 </h:dataTable>
299 </h:panelGrid>
300 </p:panel>
302 <p:panel>
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}"/>
309 </h:panelGrid>
310 </p:panel>
312 <p:messages/>
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"/>
318 </h:panelGrid>
319 </h:form>
320 </p:dialog>
322 </ui:define>
323 </ui:composition>
325 </body>
326 </html>