1 <?xml version="1.0" encoding="UTF-8" ?>
3 template="/WEB-INF/templates/admin/admin_base.tpl"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
6 xmlns:h="http://xmlns.jcp.org/jsf/html"
7 xmlns:f="http://xmlns.jcp.org/jsf/core"
8 xmlns:p="http://primefaces.org/ui"
11 <ui:define name="document_admin_title">
12 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_EMPLOYEE}" />
15 <ui:define name="content_header">
16 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_EMPLOYEE}" />
19 <ui:define name="content">
20 <h:form id="form-list-employees">
24 value="#{employeeListController.allEmployees}"
26 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
27 filteredValue="#{employeeListController.filteredEmployees}"
29 rowKey="#{employee.employeeId}"
31 resizableColumns="true"
32 rowsPerPageTemplate="5,10,20,50,100"
34 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_EMPLOYEESS}"
35 emptyMessage="#{msg.ADMIN_EMPTY_LIST_EMPLOYEESS}"
36 widgetVar="employeeList"
37 selectionMode="single"
38 selection="#{employeeListController.selectedEmployee}"
42 <f:facet name="header">
46 columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
52 columnClasses="ui-grid-4,ui-grid-8"
54 styleClass="ui-noborder"
58 value="#{msg.SEARCH_ALL_FIELDS}"
64 onkeyup="PF('employeeList').filter()"
65 placeholder="#{msg.ENTER_KEYWORD}"
70 <p:spacer height="4" />
75 value="#{msg.SELECT_SHOWN_COLUMNS}"
76 styleClass="column-selector"
79 <p:columnToggler datasource="employeeList" trigger="toggler" />
86 update="form-list-employees:employee-details"
87 oncomplete="PF('employeeDialog').show()"
91 headerText="#{msg.ID_HEADER}"
92 sortBy="#{employee.employeeId}"
96 outcome="admin_show_employee"
97 value="#{employee.employeeId}"
98 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}"
100 <f:param name="employeeId" value="#{employee.employeeId}" />
105 headerText="#{msg.EMPLOYEE_NUMBER_HEADER}"
106 sortBy="#{employee.employeeNumber}"
107 filterBy="#{employee.employeeNumber}"
108 filterMatchMode="contains"
110 <h:outputText value="#{employee.employeeNumber}" rendered="#{not empty employee.employeeNumber}" />
111 <h:outputText value="-" rendered="#{empty employee.employeeNumber}" />
115 headerText="#{msg.ADMIN_BRANCH_OFFICE_HEADER}"
116 sortBy="#{employee.employeeBranchOffice}"
117 filterBy="#{employee.employeeBranchOffice}"
120 <f:facet name="filter">
121 <p:selectCheckboxMenu
123 filterMatchMode="contains"
124 label="#{msg.LABEL_BRANCH_OFFICES}"
125 onchange="PF('employeeList').filter()"
127 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
129 <f:converter converterId="BranchOfficeConverter" />
132 value="#{branchOfficeListController.allBranchOffices}"
134 itemValue="#{branchOffice}"
135 itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
137 </p:selectCheckboxMenu>
141 outcome="admin_show_branch_office"
142 value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}"
143 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
144 rendered="#{not empty employee.employeeBranchOffice}"
146 <f:param name="branchId" value="#{employee.employeeBranchOffice.branchId}" />
150 outcome="admin_assign_branch_office"
151 value="#{msg.ADMIN_LINK_ASSIGN}"
152 title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEE_BRANCH_OFFICE_TITLE}"
153 rendered="#{empty employee.employeeBranchOffice}"
155 <f:param name="employeeId" value="#{employee.employeeId}" />
160 headerText="#{msg.ADMIN_USER_HEADER}"
161 sortBy="#{employee.employeeUserOwner}"
162 filterBy="#{employee.employeeUserOwner}"
165 <f:facet name="filter">
166 <p:selectCheckboxMenu
168 filterMatchMode="contains"
169 label="#{msg.LABEL_USERS}"
170 onchange="PF('employeeList').filter()"
171 updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
173 <f:converter converterId="UserConverter" />
176 value="#{userListController.allUsers}"
179 itemLabel="#{beanHelper.renderUser(user)}"
181 </p:selectCheckboxMenu>
185 outcome="admin_show_user"
186 value="#{employee.employeeUserOwner.userId}"
187 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEES_OWNER_USER_TITLE}"
188 rendered="#{not empty employee.employeeUserOwner}"
190 <f:param name="userId" value="#{employee.employeeUserOwner.userId}" />
194 outcome="admin_assign_user_owner"
195 value="#{msg.ADMIN_LINK_ASSIGN}"
196 title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEES_OWNER_USER_TITLE}"
197 rendered="#{empty employee.employeeUserOwner}"
199 <f:param name="employeeId" value="#{employee.employeeId}" />
204 headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}"
205 sortBy="#{employee.employeeBasicData}"
206 filterBy="#{employee.employeeBasicData}"
209 <f:facet name="filter">
210 <p:selectCheckboxMenu
212 filterMatchMode="contains"
213 label="#{msg.LABEL_COMPANIES}"
214 onchange="PF('employeeList').filter()"
216 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
218 <f:converter converterId="BasicCompanyDataConverter" />
221 value="#{basicDataListController.allBasicData}"
223 itemValue="#{basicData}"
224 itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
226 </p:selectCheckboxMenu>
230 outcome="admin_show_basic_data"
231 value="#{beanHelper.renderBasicData(employee.employeeBasicData, true)}"
232 title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
234 <f:param name="basicDataId" value="#{employee.employeeBasicData.basicDataId}" />
239 headerText="#{msg.DATA_EMAIL_ADDRESS}"
240 sortBy="#{employee.employeeEmailAddress}"
241 filterBy="#{employee.employeeEmailAddress}"
242 filterMatchMode="contains"
245 href="mailto:#{employee.employeeEmailAddress}"
246 value="#{employee.employeeEmailAddress}"
247 rendered="#{not empty employee.employeeEmailAddress}"
250 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
254 headerText="#{msg.ENTRY_CREATED_HEADER}"
255 sortBy="#{employee.employeeEntryCreated}"
258 <h:outputText value="#{employee.employeeEntryCreated}">
259 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
264 headerText="#{msg.ENTRY_UPDATED_HEADER}"
265 sortBy="#{employee.employeeEntryUpdated}"
268 <h:outputText value="#{employee.employeeEntryUpdated}">
269 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
274 headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
278 <p:menuButton value="#{msg.OPTIONS}">
280 outcome="admin_show_employee"
281 value="#{msg.ADMIN_LINK_SHOW_SHORT}"
282 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}"
284 <f:param name="employeeId" value="#{employee.employeeId}" />
288 outcome="admin_edit_employee"
289 value="#{msg.ADMIN_LINK_EDIT_SHORT}"
290 title="#{msg.ADMIN_LINK_EDIT_EMPLOYEE_TITLE}"
292 <f:param name="employeeId" value="#{employee.employeeId}" />
295 <p:menuitem outcome="admin_delete_employee">
297 styleClass="link-danger"
298 value="#{msg.ADMIN_LINK_DELETE_SHORT}"
299 title="#{msg.ADMIN_LINK_DELETE_EMPLOYEE_TITLE}"
301 <f:param name="employeeId" value="#{employee.employeeId}" />
311 header="#{msg.ADMIN_SINGLE_EMPLOYEE_DETAILS_HEADER}"
314 widgetVar="employeeDialog"
319 <p:outputPanel id="employee-details">
322 rendered="#{not empty employeeListController.selectedEmployee}"
324 <f:facet name="header">
326 value="#{msg.ADMIN_EMPLOYEE_NUMBER_DETAILS_HEADER}"
327 rendered="#{empty employeeListController.selectedEmployee.employeePersonalData}"
329 <f:param value="#{employeeListController.selectedEmployee.employeeId}" />
333 value="#{msg.ADMIN_EMPLOYEE_NAME_DETAILS_HEADER}"
334 rendered="#{not empty employeeListController.selectedEmployee.employeePersonalData}"
336 <f:param value="#{beanHelper.renderContact(employeeListController.selectedEmployee.employeePersonalData)}" />
340 <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.EMPLOYEE_ID_NUMBER_TITLE}" />
341 <h:outputText value="#{employeeListController.selectedEmployee.employeeId}" />
352 <f:facet name="header">
353 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_TITLE}" />
356 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
359 <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
362 <f:facet name="footer">
363 <p:panelGrid columns="2" layout="grid">
366 value="#{msg.BUTTON_RESET_FORM}"
371 value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
372 action="#{adminEmployeeController.addEmployee()}"
373 update="form-list-employees:employeeList"