]> 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 template="/WEB-INF/templates/admin/admin_base.tpl"
3                                 xmlns="http://www.w3.org/1999/xhtml"
4                                 xmlns:core="http://mxchange.org/jsf/core/widgets"
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         <ui:define name="document_admin_title">
12                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_EMPLOYEE}" />
13         </ui:define>
14
15         <ui:define name="content_header">
16                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_EMPLOYEE}" />
17         </ui:define>
18
19         <ui:define name="content">
20                 <h:form id="form-list-company-employees">
21                         <p:dataTable
22                                 id="table-list-company-employees"
23                                 var="employee"
24                                 value="#{employeeController.allEmployees()}"
25                                 tableStyleClass="table table-full"
26                                 paginator="true"
27                                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28                                 filteredValue="#{employeeController.filteredEmployees}"
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 id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
45                                                         <p:columnToggler datasource="table-list-company-employees" trigger="toggler" />
46                                                 </h:panelGroup>
47                                         </p:panelGrid>
48                                 </f:facet>
49
50                                 <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{employee.employeeId}" filterable="false">
51                                         <p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}" value="#{employee.employeeId}">
52                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
53                                         </p:link>
54                                 </p:column>
55
56                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_BRANCH_OFFICE}" sortBy="#{employee.employeeBranchOffice}" filterBy="#{employee.employeeBranchOffice}" filterMatchMode="in">
57                                         <f:facet name="filter">
58                                                 <p:selectCheckboxMenu
59                                                         filter="true"
60                                                         filterMatchMode="contains"
61                                                         label="#{msg.LABEL_BRANCH_OFFICES}"
62                                                         onchange="PF('employeeList').filter()"
63                                                         updateLabel="true"
64                                                         title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
65                                                         >
66                                                         <f:converter converterId="BranchOfficeConverter" />
67                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
68                                                         <f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
69                                                 </p:selectCheckboxMenu>
70                                         </f:facet>
71
72                                         <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{employee.employeeBranchOffice.branchId}" rendered="#{not empty employee.employeeBranchOffice}">
73                                                 <f:param name="branchId" value="#{employee.employeeBranchOffice.branchId}" />
74                                         </p:link>
75
76                                         <p:link outcome="admin_assign_branch_office" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICE_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty employee.employeeBranchOffice}">
77                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
78                                         </p:link>
79                                 </p:column>
80
81                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{employee.employeeUserOwner.userName}" filterBy="#{employee.employeeUserOwner}" filterMatchMode="in">
82                                         <f:facet name="filter">
83                                                 <p:selectCheckboxMenu
84                                                         filter="true"
85                                                         filterMatchMode="contains"
86                                                         label="#{msg.LABEL_USERS}"
87                                                         onchange="PF('employeeList').filter()"
88                                                         updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
89                                                         >
90                                                         <f:converter converterId="UserConverter" />
91                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
92                                                         <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
93                                                 </p:selectCheckboxMenu>
94                                         </f:facet>
95
96                                         <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_EMPLOYEES_OWNER_USER_TITLE}" value="#{employee.employeeUserOwner.userId}" rendered="#{not empty employee.employeeUserOwner}">
97                                                 <f:param name="userId" value="#{employee.employeeUserOwner.userId}" />
98                                         </p:link>
99
100                                         <p:link outcome="admin_assign_employee_owner" title="#{msg.ADMIN_LINK_ASSIGN_EMPLOYEES_OWNER_USER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty employee.employeeUserOwner}">
101                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
102                                         </p:link>
103                                 </p:column>
104
105                                 <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{employee.employeeCompany.companyName}" filterBy="#{employee.employeeCompany}" filterMatchMode="in">
106                                         <f:facet name="filter">
107                                                 <p:selectCheckboxMenu
108                                                         filter="true"
109                                                         filterMatchMode="contains"
110                                                         label="#{msg.LABEL_COMPANIES}"
111                                                         onchange="PF('employeeList').filter()"
112                                                         updateLabel="true"
113                                                         title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
114                                                         >
115                                                         <f:converter converterId="BasicCompanyDataConverter" />
116                                                         <f:selectItems value="#{basicCompanyDataController.allBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
117                                                 </p:selectCheckboxMenu>
118                                         </f:facet>
119
120                                         <h:outputLink value="#{employee.employeeCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty employee.employeeCompany.companyWebsiteUrl}">
121                                                 <h:outputText value="#{employee.employeeCompany.companyName}" />
122                                         </h:outputLink>
123
124                                         <h:outputText value="#{employee.employeeCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty employee.employeeCompany.companyWebsiteUrl}" />
125                                 </p:column>
126
127                                 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{employee.employeeEmailAddress}" filterBy="#{employee.employeeEmailAddress}" filterMatchMode="contains">
128                                         <h:outputLink value="mailto:#{employee.employeeEmailAddress}" rendered="#{not empty employee.employeeEmailAddress}" />
129
130                                         <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
131                                 </p:column>
132
133                                 <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{employee.employeeCreated}" filterable="false">
134                                         <h:outputText id="employeeCreated" value="#{employee.employeeCreated.time}">
135                                                 <f:convertDateTime for="employeeCreated" type="both" timeStyle="short" dateStyle="short" />
136                                         </h:outputText>
137                                 </p:column>
138
139                                 <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false" filterable="false">
140                                         <links:outputEmployeeAdminMiniLinks employee="#{employee}" />
141                                 </p:column>
142                         </p:dataTable>
143                 </h:form>
144
145                 <h:form>
146                         <p:panelGrid layout="grid" columns="1" styleClass="table table-full">
147                                 <f:facet name="header">
148                                         <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_TITLE}" />
149                                 </f:facet>
150
151                                 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
152
153                                 <h:column>
154                                         <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
155                                 </h:column>
156
157                                 <f:facet name="footer">
158                                         <p:panelGrid columns="2" layout="grid">
159                                                 <p:commandButton
160                                                         styleClass="reset"
161                                                         type="reset"
162                                                         value="#{msg.BUTTON_RESET_FORM}"
163                                                         />
164
165                                                 <p:commandButton
166                                                         styleClass="submit"
167                                                         type="submit"
168                                                         value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
169                                                         action="#{adminEmployeeController.addEmployee()}"
170                                                         update=":master:form-list-company-employees:table-list-company-employees"
171                                                         />
172                                         </p:panelGrid>
173                                 </f:facet>
174                         </p:panelGrid>
175                 </h:form>
176         </ui:define>
177 </ui:composition>