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:links="http://mxchange.org/jsf/core/links"
6 xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
7 xmlns:h="http://xmlns.jcp.org/jsf/html"
8 xmlns:f="http://xmlns.jcp.org/jsf/core"
9 xmlns:p="http://primefaces.org/ui"
12 <ui:define name="document_admin_title">
13 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_EMPLOYEE}" />
16 <ui:define name="content_header">
17 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_EMPLOYEE}" />
20 <ui:define name="content">
21 <h:form id="form-list-employees">
25 value="#{employeeListController.allEmployees}"
27 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28 filteredValue="#{employeeListController.filteredEmployees}"
30 rowKey="#{employee.employeeId}"
32 resizableColumns="true"
33 rowsPerPageTemplate="5,10,20,50,100"
35 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_EMPLOYEESS}"
36 emptyMessage="#{msg.ADMIN_EMPTY_LIST_EMPLOYEESS}"
37 widgetVar="employeeList"
38 selectionMode="single"
39 selection="#{employeeListController.selectedEmployee}"
43 <f:facet name="header">
47 columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
53 columnClasses="ui-grid-4,ui-grid-8"
55 styleClass="ui-noborder"
59 value="#{msg.SEARCH_ALL_FIELDS}"
65 onkeyup="PF('employeeList').filter()"
66 placeholder="#{msg.ENTER_KEYWORD}"
71 <p:spacer height="4" />
76 value="#{msg.SELECT_SHOWN_COLUMNS}"
77 styleClass="column-selector"
80 <p:columnToggler datasource="employeeList" trigger="toggler" />
87 update="form-list-employees:employee-details"
88 oncomplete="PF('employeeDialog').show()"
92 headerText="#{msg.ID_HEADER}"
93 sortBy="#{employee.employeeId}"
97 outcome="admin_show_employee"
98 value="#{employee.employeeId}"
99 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}"
101 <f:param name="employeeId" value="#{employee.employeeId}" />
106 headerText="#{msg.EMPLOYEE_NUMBER_HEADER}"
107 sortBy="#{employee.employeeNumber}"
108 filterBy="#{employee.employeeNumber}"
109 filterMatchMode="contains"
111 <h:outputText value="#{employee.employeeNumber}" rendered="#{not empty employee.employeeNumber}" />
112 <h:outputText value="-" rendered="#{empty employee.employeeNumber}" />
116 headerText="#{msg.ADMIN_BRANCH_OFFICE_HEADER}"
117 sortBy="#{employee.employeeBranchOffice}"
118 filterBy="#{employee.employeeBranchOffice}"
121 <f:facet name="filter">
122 <p:selectCheckboxMenu
124 filterMatchMode="contains"
125 label="#{msg.LABEL_BRANCH_OFFICES}"
126 onchange="PF('employeeList').filter()"
128 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
130 <f:converter converterId="BranchOfficeConverter" />
133 value="#{branchOfficeListController.allBranchOffices}"
135 itemValue="#{branchOffice}"
136 itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
138 </p:selectCheckboxMenu>
142 outcome="admin_show_branch_office"
143 value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}"
144 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
145 rendered="#{not empty employee.employeeBranchOffice}"
147 <f:param name="branchId" value="#{employee.employeeBranchOffice.branchId}" />
151 outcome="admin_assign_branch_office"
152 value="#{msg.ADMIN_LINK_ASSIGN}"
153 title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEE_BRANCH_OFFICE_TITLE}"
154 rendered="#{empty employee.employeeBranchOffice}"
156 <f:param name="employeeId" value="#{employee.employeeId}" />
161 headerText="#{msg.ADMIN_USER_HEADER}"
162 sortBy="#{employee.employeeUserOwner}"
163 filterBy="#{employee.employeeUserOwner}"
166 <f:facet name="filter">
167 <p:selectCheckboxMenu
169 filterMatchMode="contains"
170 label="#{msg.LABEL_USERS}"
171 onchange="PF('employeeList').filter()"
172 updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
174 <f:converter converterId="UserConverter" />
177 value="#{userListController.allUsers}"
180 itemLabel="#{beanHelper.renderUser(user)}"
182 </p:selectCheckboxMenu>
186 outcome="admin_show_user"
187 value="#{employee.employeeUserOwner.userId}"
188 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEES_OWNER_USER_TITLE}"
189 rendered="#{not empty employee.employeeUserOwner}"
191 <f:param name="userId" value="#{employee.employeeUserOwner.userId}" />
195 outcome="admin_assign_user_owner"
196 value="#{msg.ADMIN_LINK_ASSIGN}"
197 title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEES_OWNER_USER_TITLE}"
198 rendered="#{empty employee.employeeUserOwner}"
200 <f:param name="employeeId" value="#{employee.employeeId}" />
205 headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}"
206 sortBy="#{employee.employeeBasicData}"
207 filterBy="#{employee.employeeBasicData}"
210 <f:facet name="filter">
211 <p:selectCheckboxMenu
213 filterMatchMode="contains"
214 label="#{msg.LABEL_COMPANIES}"
215 onchange="PF('employeeList').filter()"
217 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
219 <f:converter converterId="BasicCompanyDataConverter" />
222 value="#{basicDataListController.allBasicData}"
224 itemValue="#{basicData}"
225 itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
227 </p:selectCheckboxMenu>
231 outcome="admin_show_basic_data"
232 value="#{beanHelper.renderBasicData(employee.employeeBasicData, true)}"
233 title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
235 <f:param name="basicDataId" value="#{employee.employeeBasicData.basicDataId}" />
240 headerText="#{msg.DATA_EMAIL_ADDRESS}"
241 sortBy="#{employee.employeeEmailAddress}"
242 filterBy="#{employee.employeeEmailAddress}"
243 filterMatchMode="contains"
246 href="mailto:#{employee.employeeEmailAddress}"
247 value="#{employee.employeeEmailAddress}"
248 rendered="#{not empty employee.employeeEmailAddress}"
251 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
255 headerText="#{msg.ENTRY_CREATED_HEADER}"
256 sortBy="#{employee.employeeEntryCreated}"
259 <h:outputText value="#{employee.employeeEntryCreated}">
260 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
265 headerText="#{msg.ENTRY_UPDATED_HEADER}"
266 sortBy="#{employee.employeeEntryUpdated}"
269 <h:outputText value="#{employee.employeeEntryUpdated}">
270 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
275 headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
279 <p:menuButton value="#{msg.OPTIONS}">
281 outcome="admin_show_employee"
282 value="#{msg.ADMIN_LINK_SHOW_SHORT}"
283 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}"
285 <f:param name="employeeId" value="#{employee.employeeId}" />
289 outcome="admin_edit_employee"
290 value="#{msg.ADMIN_LINK_EDIT_SHORT}"
291 title="#{msg.ADMIN_LINK_EDIT_EMPLOYEE_TITLE}"
293 <f:param name="employeeId" value="#{employee.employeeId}" />
296 <p:menuitem outcome="admin_delete_employee">
298 styleClass="link-danger"
299 value="#{msg.ADMIN_LINK_DELETE_SHORT}"
300 title="#{msg.ADMIN_LINK_DELETE_EMPLOYEE_TITLE}"
302 <f:param name="employeeId" value="#{employee.employeeId}" />
312 header="#{msg.ADMIN_SINGLE_EMPLOYEE_DETAILS_HEADER}"
315 widgetVar="employeeDialog"
320 <p:outputPanel id="employee-details">
323 rendered="#{not empty employeeListController.selectedEmployee}"
325 <f:facet name="header">
327 value="#{msg.ADMIN_EMPLOYEE_NUMBER_DETAILS_HEADER}"
328 rendered="#{empty employeeListController.selectedEmployee.employeePersonalData}"
330 <f:param value="#{employeeListController.selectedEmployee.employeeId}" />
334 value="#{msg.ADMIN_EMPLOYEE_NAME_DETAILS_HEADER}"
335 rendered="#{not empty employeeListController.selectedEmployee.employeePersonalData}"
337 <f:param value="#{beanHelper.renderContact(employeeListController.selectedEmployee.employeePersonalData)}" />
341 <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.EMPLOYEE_ID_NUMBER_TITLE}" />
342 <h:outputText value="#{employeeListController.selectedEmployee.employeeId}" />
353 <f:facet name="header">
354 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_TITLE}" />
357 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
360 <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
363 <f:facet name="footer">
364 <p:panelGrid columns="2" layout="grid">
367 value="#{msg.BUTTON_RESET_FORM}"
372 value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
373 action="#{adminEmployeeController.addEmployee()}"
374 update="form-list-employees:employeeList"