1 <?xml version="1.0" encoding="UTF-8" ?>
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"
12 <ui:define name="document_admin_title">
13 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_EMPLOYEE}" />
16 <ui:define name="content_header">
17 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_EMPLOYEE}" />
20 <ui:define name="content">
21 <h:form id="form-list-company-employees">
25 value="#{employeeController.allEmployees()}"
26 filteredValue="#{employeeController.filteredEmployees}"
28 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
31 resizableColumns="true"
32 rowsPerPageTemplate="5,10,20,50,100"
34 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_EMPLOYEES}"
35 emptyMessage="#{msg.ADMIN_EMPTY_LIST_EMPLOYEES}"
36 widgetVar="employeeList"
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}" />
47 value="#{msg.SELECT_SHOWN_COLUMNS}"
48 styleClass="column-selector"
51 <p:columnToggler datasource="employeeList" trigger="toggler" />
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}" />
62 <p:column headerText="#{msg.ADMIN_ASSIGNED_BRANCH_OFFICE}" sortBy="#{employee.employeeBranchOffice}" filterBy="#{employee.employeeBranchOffice}" filterMatchMode="in">
63 <f:facet name="filter">
66 filterMatchMode="contains"
67 label="#{msg.LABEL_BRANCH_OFFICES}"
68 onchange="PF('employeeList').filter()"
70 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
72 <f:converter converterId="BranchOfficeConverter" />
73 <f:selectItems value="#{branchOfficeListController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
74 </p:selectCheckboxMenu>
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}" />
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}" />
86 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER_HEADER}" sortBy="#{employee.employeeUserOwner}" filterBy="#{employee.employeeUserOwner}" filterMatchMode="in">
87 <f:facet name="filter">
90 filterMatchMode="contains"
91 label="#{msg.LABEL_USERS}"
92 onchange="PF('employeeList').filter()"
93 updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
95 <f:converter converterId="UserConverter" />
96 <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
97 </p:selectCheckboxMenu>
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}" />
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}" />
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
113 filterMatchMode="contains"
114 label="#{msg.LABEL_COMPANIES}"
115 onchange="PF('employeeList').filter()"
117 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
119 <f:converter converterId="BasicCompanyDataConverter" />
120 <f:selectItems value="#{basicDataListController.allBasicData}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
121 </p:selectCheckboxMenu>
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)}" />
128 <h:outputText value="#{beanHelper.renderBasicData(employee.employeeBasicData)}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty employee.employeeBasicData.companyWebsiteUrl}" />
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}" />
134 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
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" />
143 <p:column headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" filterable="false">
144 <links:outputEmployeeAdminDropdownMenu employee="#{employee}" />
154 <f:facet name="header">
155 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_TITLE}" />
158 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
161 <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
164 <f:facet name="footer">
165 <p:panelGrid columns="2" layout="grid">
168 value="#{msg.BUTTON_RESET_FORM}"
174 value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
175 action="#{adminEmployeeController.addEmployee()}"
176 update=":master:form-list-company-employees:employeeList"