]> 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 headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{employee.employeeId}" filterable="false">
57                                         <p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}" value="#{employee.employeeId}">
58                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
59                                         </p:link>
60                                 </p:column>
61
62                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_BRANCH_OFFICE}" sortBy="#{employee.employeeBranchOffice}" filterBy="#{employee.employeeBranchOffice}" filterMatchMode="in">
63                                         <f:facet name="filter">
64                                                 <p:selectCheckboxMenu
65                                                         filter="true"
66                                                         filterMatchMode="contains"
67                                                         label="#{msg.LABEL_BRANCH_OFFICES}"
68                                                         onchange="PF('employeeList').filter()"
69                                                         updateLabel="true"
70                                                         title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
71                                                         >
72                                                         <f:converter converterId="BranchOfficeConverter" />
73
74                                                         <f:selectItems
75                                                                 value="#{branchOfficeListController.allBranchOffices()}"
76                                                                 var="branchOffice"
77                                                                 itemValue="#{branchOffice}"
78                                                                 itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}"
79                                                                 />
80                                                 </p:selectCheckboxMenu>
81                                         </f:facet>
82
83                                         <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{beanHelper.renderBranchOffice(employee.employeeBranchOffice)}" rendered="#{not empty employee.employeeBranchOffice}">
84                                                 <f:param name="branchId" value="#{employee.employeeBranchOffice.branchId}" />
85                                         </p:link>
86
87                                         <p:link outcome="admin_assign_branch_office" title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEE_BRANCH_OFFICE_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty employee.employeeBranchOffice}">
88                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
89                                         </p:link>
90                                 </p:column>
91
92                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER_HEADER}" sortBy="#{employee.employeeUserOwner}" filterBy="#{employee.employeeUserOwner}" filterMatchMode="in">
93                                         <f:facet name="filter">
94                                                 <p:selectCheckboxMenu
95                                                         filter="true"
96                                                         filterMatchMode="contains"
97                                                         label="#{msg.LABEL_USERS}"
98                                                         onchange="PF('employeeList').filter()"
99                                                         updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
100                                                         >
101                                                         <f:converter converterId="UserConverter" />
102
103                                                         <f:selectItems
104                                                                 value="#{userController.allUsers()}"
105                                                                 var="user"
106                                                                 itemValue="#{user}"
107                                                                 itemLabel="#{beanHelper.renderUser(user)}"
108                                                                 />
109                                                 </p:selectCheckboxMenu>
110                                         </f:facet>
111
112                                         <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_EMPLOYEES_OWNER_USER_TITLE}" value="#{employee.employeeUserOwner.userId}" rendered="#{not empty employee.employeeUserOwner}">
113                                                 <f:param name="userId" value="#{employee.employeeUserOwner.userId}" />
114                                         </p:link>
115
116                                         <p:link outcome="admin_assign_user_owner" title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEES_OWNER_USER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty employee.employeeUserOwner}">
117                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
118                                         </p:link>
119                                 </p:column>
120
121                                 <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}" sortBy="#{employee.employeeBasicData}" filterBy="#{employee.employeeBasicData}" filterMatchMode="in">
122                                         <f:facet name="filter">
123                                                 <p:selectCheckboxMenu
124                                                         filter="true"
125                                                         filterMatchMode="contains"
126                                                         label="#{msg.LABEL_COMPANIES}"
127                                                         onchange="PF('employeeList').filter()"
128                                                         updateLabel="true"
129                                                         title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
130                                                         >
131                                                         <f:converter converterId="BasicCompanyDataConverter" />
132
133                                                         <f:selectItems
134                                                                 value="#{basicDataListController.allBasicData}"
135                                                                 var="basicData"
136                                                                 itemValue="#{basicData}"
137                                                                 itemLabel="#{beanHelper.renderBasicData(basicData)}"
138                                                                 />
139                                                 </p:selectCheckboxMenu>
140                                         </f:facet>
141
142                                         <h:outputLink value="#{employee.employeeBasicData.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty employee.employeeBasicData.companyWebsiteUrl}">
143                                                 <h:outputText value="#{beanHelper.renderBasicData(employee.employeeBasicData)}" />
144                                         </h:outputLink>
145
146                                         <h:outputText value="#{beanHelper.renderBasicData(employee.employeeBasicData)}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty employee.employeeBasicData.companyWebsiteUrl}" />
147                                 </p:column>
148
149                                 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{employee.employeeEmailAddress}" filterBy="#{employee.employeeEmailAddress}" filterMatchMode="contains">
150                                         <p:link href="mailto:#{employee.employeeEmailAddress}" value="#{employee.employeeEmailAddress}" rendered="#{not empty employee.employeeEmailAddress}" />
151
152                                         <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
153                                 </p:column>
154
155                                 <p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{employee.employeeCreated}" filterable="false">
156                                         <h:outputText id="employeeCreated" value="#{employee.employeeCreated}">
157                                                 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
158                                         </h:outputText>
159                                 </p:column>
160
161                                 <p:column headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" filterable="false">
162                                         <links:outputEmployeeAdminDropdownMenu employee="#{employee}" />
163                                 </p:column>
164                         </p:dataTable>
165                 </h:form>
166
167                 <h:form>
168                         <p:panelGrid
169                                 columns="1"
170                                 layout="grid"
171                                 >
172                                 <f:facet name="header">
173                                         <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_TITLE}" />
174                                 </f:facet>
175
176                                 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
177
178                                 <p:column>
179                                         <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
180                                 </p:column>
181
182                                 <f:facet name="footer">
183                                         <p:panelGrid columns="2" layout="grid">
184                                                 <p:commandButton
185                                                         type="reset"
186                                                         value="#{msg.BUTTON_RESET_FORM}"
187                                                         />
188
189                                                 <p:commandButton
190                                                         process="@form"
191                                                         type="submit"
192                                                         value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
193                                                         action="#{adminEmployeeController.addEmployee()}"
194                                                         update=":master:form-list-company-employees:employeeList"
195                                                         />
196                                         </p:panelGrid>
197                                 </f:facet>
198                         </p:panelGrid>
199                 </h:form>
200         </ui:define>
201 </ui:composition>