]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/employee/admin_employee_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / employee / admin_employee_list.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition
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"
10         >
11
12         <ui:define name="document_admin_title">
13                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_EMPLOYEE}" />
14         </ui:define>
15
16         <ui:define name="content_header">
17                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_EMPLOYEE}" />
18         </ui:define>
19
20         <ui:define name="content">
21                 <h:form id="form-list-company-employees">
22                         <p:dataTable
23                                 id="employeeList"
24                                 var="employee"
25                                 value="#{employeeController.allEmployees()}"
26                                 filteredValue="#{employeeController.filteredEmployees}"
27                                 paginator="true"
28                                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
29                                 rows="10"
30                                 reflow="true"
31                                 resizableColumns="true"
32                                 rowsPerPageTemplate="5,10,20,50,100"
33                                 sortMode="multiple"
34                                 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_EMPLOYEES}"
35                                 emptyMessage="#{msg.ADMIN_EMPTY_LIST_EMPLOYEES}"
36                                 widgetVar="employeeList"
37                                 >
38
39                                 <f:facet name="header">
40                                         <p:panelGrid columns="2" columnClasses="ui-grid-col-10,ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
41                                                 <h:outputText value="#{msg.ADMIN_LIST_EMPLOYEES_HEADER}" />
42
43                                                 <h:panelGroup>
44                                                         <p:commandButton
45                                                                 id="toggler"
46                                                                 type="button"
47                                                                 value="#{msg.SELECT_SHOWN_COLUMNS}"
48                                                                 styleClass="column-selector"
49                                                                 />
50
51                                                         <p:columnToggler datasource="employeeList" trigger="toggler" />
52                                                 </h:panelGroup>
53                                         </p:panelGrid>
54                                 </f:facet>
55
56                                 <p:column
57                                         headerText="#{msg.ID_HEADER}"
58                                         sortBy="#{employee.employeeId}"
59                                         filterable="false"
60                                         >
61                                         <p:link
62                                                 outcome="admin_show_employee"
63                                                 value="#{employee.employeeId}"
64                                                 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}"
65                                                 >
66                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
67                                         </p:link>
68                                 </p:column>
69
70                                 <p:column
71                                         headerText="#{msg.EMPLOYEE_NUMBER_HEADER}"
72                                         sortBy="#{employee.employeeNumber}"
73                                         filterBy="#{employee.employeeNumber}"
74                                         filterMatchMode="contains"
75                                         >
76                                         <h:outputText value="#{employee.employeeNumber}" rendered="#{not empty employee.employeeNumber}" />
77                                         <h:outputText value="-" rendered="#{empty employee.employeeNumber}" />
78                                 </p:column>
79
80                                 <p:column
81                                         headerText="#{msg.ADMIN_BRANCH_OFFICE_HEADER}"
82                                         sortBy="#{employee.employeeBranchOffice}"
83                                         filterBy="#{employee.employeeBranchOffice}"
84                                         filterMatchMode="in"
85                                         >
86                                         <f:facet name="filter">
87                                                 <p:selectCheckboxMenu
88                                                         filter="true"
89                                                         filterMatchMode="contains"
90                                                         label="#{msg.LABEL_BRANCH_OFFICES}"
91                                                         onchange="PF('employeeList').filter()"
92                                                         updateLabel="true"
93                                                         title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
94                                                         >
95                                                         <f:converter converterId="BranchOfficeConverter" />
96
97                                                         <f:selectItems
98                                                                 value="#{branchOfficeListController.allBranchOffices()}"
99                                                                 var="branchOffice"
100                                                                 itemValue="#{branchOffice}"
101                                                                 itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
102                                                                 />
103                                                 </p:selectCheckboxMenu>
104                                         </f:facet>
105
106                                         <p:link
107                                                 outcome="admin_show_branch_office"
108                                                 value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}"
109                                                 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
110                                                 rendered="#{not empty employee.employeeBranchOffice}"
111                                                 >
112                                                 <f:param name="branchId" value="#{employee.employeeBranchOffice.branchId}" />
113                                         </p:link>
114
115                                         <p:link
116                                                 outcome="admin_assign_branch_office"
117                                                 value="#{msg.ADMIN_LINK_ASSIGN}"
118                                                 title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEE_BRANCH_OFFICE_TITLE}"
119                                                 rendered="#{empty employee.employeeBranchOffice}"
120                                                 >
121                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
122                                         </p:link>
123                                 </p:column>
124
125                                 <p:column
126                                         headerText="#{msg.ADMIN_USER_HEADER}"
127                                         sortBy="#{employee.employeeUserOwner}"
128                                         filterBy="#{employee.employeeUserOwner}"
129                                         filterMatchMode="in"
130                                         >
131                                         <f:facet name="filter">
132                                                 <p:selectCheckboxMenu
133                                                         filter="true"
134                                                         filterMatchMode="contains"
135                                                         label="#{msg.LABEL_USERS}"
136                                                         onchange="PF('employeeList').filter()"
137                                                         updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
138                                                         >
139                                                         <f:converter converterId="UserConverter" />
140
141                                                         <f:selectItems
142                                                                 value="#{userListController.allUsers}"
143                                                                 var="user"
144                                                                 itemValue="#{user}"
145                                                                 itemLabel="#{beanHelper.renderUser(user)}"
146                                                                 />
147                                                 </p:selectCheckboxMenu>
148                                         </f:facet>
149
150                                         <p:link
151                                                 outcome="admin_show_user"
152                                                 value="#{employee.employeeUserOwner.userId}"
153                                                 title="#{msg.ADMIN_LINK_SHOW_EMPLOYEES_OWNER_USER_TITLE}"
154                                                 rendered="#{not empty employee.employeeUserOwner}"
155                                                 >
156                                                 <f:param name="userId" value="#{employee.employeeUserOwner.userId}" />
157                                         </p:link>
158
159                                         <p:link
160                                                 outcome="admin_assign_user_owner"
161                                                 value="#{msg.ADMIN_LINK_ASSIGN}"
162                                                 title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEES_OWNER_USER_TITLE}"
163                                                 rendered="#{empty employee.employeeUserOwner}"
164                                                 >
165                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
166                                         </p:link>
167                                 </p:column>
168
169                                 <p:column
170                                         headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}"
171                                         sortBy="#{employee.employeeBasicData}"
172                                         filterBy="#{employee.employeeBasicData}"
173                                         filterMatchMode="in"
174                                         >
175                                         <f:facet name="filter">
176                                                 <p:selectCheckboxMenu
177                                                         filter="true"
178                                                         filterMatchMode="contains"
179                                                         label="#{msg.LABEL_COMPANIES}"
180                                                         onchange="PF('employeeList').filter()"
181                                                         updateLabel="true"
182                                                         title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
183                                                         >
184                                                         <f:converter converterId="BasicCompanyDataConverter" />
185
186                                                         <f:selectItems
187                                                                 value="#{basicDataListController.allBasicData}"
188                                                                 var="basicData"
189                                                                 itemValue="#{basicData}"
190                                                                 itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
191                                                                 />
192                                                 </p:selectCheckboxMenu>
193                                         </f:facet>
194
195                                         <p:link
196                                                 outcome="admin_show_basic_data"
197                                                 value="#{beanHelper.renderBasicData(employee.employeeBasicData, true)}"
198                                                 title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
199                                                 >
200                                                 <f:param name="basicDataId" value="#{employee.employeeBasicData.basicDataId}" />
201                                         </p:link>
202                                 </p:column>
203
204                                 <p:column
205                                         headerText="#{msg.DATA_EMAIL_ADDRESS}"
206                                         sortBy="#{employee.employeeEmailAddress}"
207                                         filterBy="#{employee.employeeEmailAddress}"
208                                         filterMatchMode="contains"
209                                         >
210                                         <p:link
211                                                 href="mailto:#{employee.employeeEmailAddress}"
212                                                 value="#{employee.employeeEmailAddress}"
213                                                 rendered="#{not empty employee.employeeEmailAddress}"
214                                                 />
215
216                                         <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
217                                 </p:column>
218
219                                 <p:column
220                                         headerText="#{msg.ENTRY_CREATED_HEADER}"
221                                         sortBy="#{employee.employeeCreated}"
222                                         filterable="false"
223                                         >
224                                         <h:outputText id="employeeCreated" value="#{employee.employeeCreated}">
225                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
226                                         </h:outputText>
227                                 </p:column>
228
229                                 <p:column
230                                         headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
231                                         sortable="false"
232                                         filterable="false"
233                                         >
234                                         <links:outputEmployeeAdminDropdownMenu employee="#{employee}" />
235                                 </p:column>
236                         </p:dataTable>
237                 </h:form>
238
239                 <h:form>
240                         <p:panelGrid
241                                 columns="1"
242                                 layout="grid"
243                                 >
244                                 <f:facet name="header">
245                                         <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_TITLE}" />
246                                 </f:facet>
247
248                                 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
249
250                                 <p:column>
251                                         <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
252                                 </p:column>
253
254                                 <f:facet name="footer">
255                                         <p:panelGrid columns="2" layout="grid">
256                                                 <p:commandButton
257                                                         type="reset"
258                                                         value="#{msg.BUTTON_RESET_FORM}"
259                                                         />
260
261                                                 <p:commandButton
262                                                         type="submit"
263                                                         value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
264                                                         action="#{adminEmployeeController.addEmployee()}"
265                                                         update="form-list-company-employees:employeeList"
266                                                         />
267                                         </p:panelGrid>
268                                 </f:facet>
269                         </p:panelGrid>
270                 </h:form>
271         </ui:define>
272 </ui:composition>