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:
ui=
"http://java.sun.com/jsf/facelets"
5 xmlns:
p=
"http://primefaces.prime.com.tr/ui"
6 xmlns:
h=
"http://java.sun.com/jsf/html"
7 xmlns:
f=
"http://java.sun.com/jsf/core">
10 <ui:composition template=
"./WEB-INF/skiSchoolTemplate.xhtml">
11 <ui:param name=
"pageTitle" value=
"#{msgs.site_usermanagement}" />
12 <ui:define name=
"content">
14 <p:growl id=
"growl" showDetail=
"true"/>
16 <p:tabView rendered=
"#{securityBean.inRoleAdministrator}">
17 <p:tab title=
"#{msgs.global_instructors}">
18 <h:form id=
"instructors">
19 <p:dataTable value=
"#{instructorsBean.allInstructors}" var=
"item">
20 <p:column filterBy=
"#{item.lastName} #{item.firstName}">
21 <f:facet name=
"header">
22 <h:outputText value=
"#{msgs.global_name}"/>
24 <h:outputText value=
"#{item.firstName} #{item.lastName}"/>
27 <f:facet name=
"header">
28 <h:outputText value=
"#{msgs.global_email}"/>
30 <h:outputText value=
"#{item.email}"/>
33 <f:facet name=
"header">
34 <h:outputText value=
"#{msgs.global_phone}"/>
36 <h:outputText value=
"#{item.phone}"/>
39 <f:facet name=
"header">
40 <h:outputText value=
"#{msgs.instructor_positionski}"/>
42 <h:outputText value=
"#{item.positionSki}"/>
45 <f:facet name=
"header">
46 <h:outputText value=
"#{msgs.instructor_positionsnb}"/>
48 <h:outputText value=
"#{item.positionSnowboard}"/>
51 <f:facet name=
"header">
52 <h:outputText value=
"#{msgs.global_availability}"/>
54 <h:commandLink action=
"#{availabilityBean.newAvailability}" value=
"#{msgs.global_set}">
55 <f:setPropertyActionListener value=
"#{item}"
56 target=
"#{availabilityBean.instructor}" />
60 <f:facet name=
"header">
61 <h:outputText value=
"#{msgs.global_lessons}"/>
63 <h:commandLink action=
"instructorlessons" value=
"#{msgs.global_show}">
64 <f:setPropertyActionListener value=
"#{item}"
65 target=
"#{selectBean.instructor}" />
68 <p:column rendered=
"#{securityBean.inRoleAdministrator}">
69 <f:facet name=
"header">
70 <h:outputText value=
"#{msgs.global_edit}"/>
72 <h:commandLink value=
"Edit" action=
"#{instructorsBean.editInstructor(item)}" title=
"Edit" styleClass=
"ui-icon ui-icon-pencil"/>
78 <p:tab title=
"#{msgs.global_students}">
79 <h:form id=
"students">
80 <p:dataTable value=
"#{studentsBean.allStudents}" var=
"student">
81 <p:column filterBy=
"#{student.lastName} #{student.firstName}">
82 <f:facet name=
"header">
83 <h:outputText value=
"#{msgs.global_name}"/>
85 <h:outputText value=
"#{student.firstName} #{student.lastName}"/>
88 <f:facet name=
"header">
89 <h:outputText value=
"#{msgs.global_email}"/>
91 <h:outputText value=
"#{student.email}"/>
94 <f:facet name=
"header">
95 <h:outputText value=
"#{msgs.global_phone}"/>
97 <h:outputText value=
"#{student.phone}"/>
100 <f:facet name=
"header">
101 <h:outputText value=
"#{msgs.student_age}"/>
103 <h:outputText value=
"#{student.age}"/>
106 <f:facet name=
"header">
107 <h:outputText value=
"#{msgs.global_ski}"/>
109 <h:selectBooleanCheckbox value=
"#{student.ski}" disabled=
"true"/>
112 <f:facet name=
"header">
113 <h:outputText value=
"#{msgs.global_snb}"/>
115 <h:selectBooleanCheckbox value=
"#{student.snowboard}" disabled=
"true"/>
118 <f:facet name=
"header">
119 <h:outputText value=
"#{msgs.student_groupsize}"/>
121 <h:outputText value=
"#{student.groupSize}"/>
124 <f:facet name=
"header">
125 <h:outputText value=
"#{msgs.global_note}"/>
127 <h:outputText value=
"#{student.note}"/>
130 <f:facet name=
"header">
131 <h:outputText value=
"#{msgs.global_lessons}"/>
133 <h:commandLink action=
"studentlessons" value=
"#{msgs.global_show}">
134 <f:setPropertyActionListener value=
"#{student}"
135 target=
"#{selectBean.student}" />
138 <p:column rendered=
"#{securityBean.inRoleAdministrator}">
139 <f:facet name=
"header">
140 <h:outputText value=
"#{msgs.global_edit}"/>
142 <h:commandLink value=
"Edit" action=
"#{studentsBean.editStudent(student)}" title=
"#{msgs.global_edit}" styleClass=
"ui-icon ui-icon-pencil"/>
145 <f:facet name=
"header">
146 <h:outputText value=
"#{msgs.global_delete}"/>
148 <p:commandLink action=
"#{studentsBean.deleteStudent(student)}" value=
"#{msgs.global_delete}" title=
"#{msgs.global_delete}" update=
"students,growl" styleClass=
"ui-icon ui-icon-trash"/>