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