]> 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:widgets="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="#{companyEmployeeController.allCompanyEmployees()}"
25                                 tableStyleClass="table table-full"
26                                 paginator="true"
27                                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28                                 filteredValue="#{companyEmployeeController.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_EMPLOYEES_LIST_EMPTY}"
36                                 widgetVar="employeeList"
37                                 >
38
39                                 <f:facet name="header">
40                                         <p:row>
41                                                 <p:column>
42                                                         <h:outputText value="#{msg.ADMIN_LIST_EMPLOYEES_HEADER}" />
43                                                 </p:column>
44                                                 <p:column>
45                                                         <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
46                                                         <p:columnToggler datasource="table-list-company-employees" trigger="toggler" />
47                                                 </p:column>
48                                         </p:row>
49                                 </f:facet>
50
51                                 <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{employee.employeeId}" filterable="false">
52                                         <p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_EMPLOYEE_TITLE}" value="#{employee.employeeId}">
53                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
54                                         </p:link>
55                                 </p:column>
56
57                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_BRANCH_OFFICE}" sortBy="#{employee.employeeBranchOffice}" filterBy="#{employee.employeeBranchOffice}" filterMatchMode="in">
58                                         <f:facet name="filter">
59                                                 <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_BRANCH_OFFICES}" onchange="PF('employeeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}">
60                                                         <f:converter converterId="BranchOfficeConverter" />
61                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
62                                                         <f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
63                                                 </p:selectCheckboxMenu>
64                                         </f:facet>
65
66                                         <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{employee.employeeBranchOffice.branchId}" rendered="#{not empty employee.employeeBranchOffice}">
67                                                 <f:param name="userId" value="#{employee.employeeBranchOffice.branchId}" />
68                                         </p:link>
69
70                                         <p:link outcome="admin_assign_branch_office" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICE_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty employee.employeeBranchOffice}">
71                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
72                                         </p:link>
73                                 </p:column>
74
75                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{employee.employeeUserOwner.userName}" filterBy="#{employee.employeeUserOwner}" filterMatchMode="in">
76                                         <f:facet name="filter">
77                                                 <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_USERS}" onchange="PF('employeeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}">
78                                                         <f:converter converterId="UserConverter" />
79                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
80                                                         <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
81                                                 </p:selectCheckboxMenu>
82                                         </f:facet>
83
84                                         <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_EMPLOYEES_OWNER_USER_TITLE}" value="#{employee.employeeUserOwner.userId}" rendered="#{not empty employee.employeeUserOwner}">
85                                                 <f:param name="userId" value="#{employee.employeeUserOwner.userId}" />
86                                         </p:link>
87
88                                         <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}">
89                                                 <f:param name="employeeId" value="#{employee.employeeId}" />
90                                         </p:link>
91                                 </p:column>
92
93                                 <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{employee.employeeCompany.companyName}" filterBy="#{employee.employeeCompany}" filterMatchMode="in">
94                                         <f:facet name="filter">
95                                                 <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_COMPANIES}" onchange="PF('employeeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}">
96                                                         <f:converter converterId="BasicCompanyDataConverter" />
97                                                         <f:selectItems value="#{basicCompanyDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
98                                                 </p:selectCheckboxMenu>
99                                         </f:facet>
100
101                                         <h:outputLink value="#{employee.employeeCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty employee.employeeCompany.companyWebsiteUrl}">
102                                                 <h:outputText value="#{employee.employeeCompany.companyName}" />
103                                         </h:outputLink>
104
105                                         <h:outputText value="#{employee.employeeCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty employee.employeeCompany.companyWebsiteUrl}" />
106                                 </p:column>
107
108                                 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{employee.employeeEmailAddress}" filterBy="#{employee.employeeEmailAddress}" filterMatchMode="contains">
109                                         <h:outputLink value="mailto:#{employee.employeeEmailAddress}" rendered="#{not empty employee.employeeEmailAddress}" />
110
111                                         <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
112                                 </p:column>
113
114                                 <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{employee.employeeCreated}" filterable="false">
115                                         <h:outputText id="employeeCreated" value="#{employee.employeeCreated.time}">
116                                                 <f:convertDateTime for="employeeCreated" type="both" timeStyle="short" dateStyle="short" />
117                                         </h:outputText>
118                                 </p:column>
119
120                                 <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false" filterable="false">
121                                         <links:outputCompanyEmployeeAdminMiniLinks employee="#{employee}" />
122                                 </p:column>
123                         </p:dataTable>
124                 </h:form>
125
126                 <h:form>
127                         <p:panelGrid layout="grid" columns="1" styleClass="table table-full">
128                                 <f:facet name="header">
129                                         <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_TITLE}" />
130                                 </f:facet>
131
132                                 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
133
134                                 <h:column>
135                                         <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
136                                 </h:column>
137
138                                 <f:facet name="footer">
139                                         <p:panelGrid columns="2" layout="grid">
140                                                 <p:commandButton
141                                                         styleClass="reset divider-right"
142                                                         type="reset"
143                                                         value="#{msg.BUTTON_RESET_FORM}"
144                                                         />
145
146                                                 <p:commandButton
147                                                         styleClass="submit"
148                                                         type="submit"
149                                                         value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
150                                                         action="#{adminCompanyEmployeeController.addCompanyEmployee()}"
151                                                         update=":master:form-list-company-employees:table-list-company-employees"
152                                                         />
153                                         </p:panelGrid>
154                                 </f:facet>
155                         </p:panelGrid>
156                 </h:form>
157         </ui:define>
158 </ui:composition>