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