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">
11 <ui:define name="document_admin_title">
12 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_EMPLOYEE}" />
15 <ui:define name="content_header">
16 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_EMPLOYEE}" />
19 <ui:define name="content">
20 <h:form id="form-list-company-employees">
24 value="#{employeeController.allEmployees()}"
25 filteredValue="#{employeeController.filteredEmployees}"
26 tableStyleClass="table table-full"
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}" />
44 <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
45 <p:columnToggler datasource="employeeList" trigger="toggler" />
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}" />
56 <p:column headerText="#{msg.ADMIN_ASSIGNED_BRANCH_OFFICE}" sortBy="#{employee.employeeBranchOffice}" filterBy="#{employee.employeeBranchOffice}" filterMatchMode="in">
57 <f:facet name="filter">
60 filterMatchMode="contains"
61 label="#{msg.LABEL_BRANCH_OFFICES}"
62 onchange="PF('employeeList').filter()"
64 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
66 <f:converter converterId="BranchOfficeConverter" />
67 <f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
68 </p:selectCheckboxMenu>
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}" />
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}" />
80 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER_HEADER}" sortBy="#{employee.employeeUserOwner}" filterBy="#{employee.employeeUserOwner}" filterMatchMode="in">
81 <f:facet name="filter">
84 filterMatchMode="contains"
85 label="#{msg.LABEL_USERS}"
86 onchange="PF('employeeList').filter()"
87 updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
89 <f:converter converterId="UserConverter" />
90 <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
91 </p:selectCheckboxMenu>
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}" />
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}" />
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
107 filterMatchMode="contains"
108 label="#{msg.LABEL_COMPANIES}"
109 onchange="PF('employeeList').filter()"
111 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
113 <f:converter converterId="BasicCompanyDataConverter" />
114 <f:selectItems value="#{basicDataListController.allBasicData}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
115 </p:selectCheckboxMenu>
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)}" />
122 <h:outputText value="#{beanHelper.renderBasicData(employee.employeeBasicData)}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty employee.employeeBasicData.companyWebsiteUrl}" />
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}" />
128 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty employee.employeeEmailAddress}" />
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" />
137 <p:column headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" filterable="false">
138 <links:outputEmployeeAdminMiniLinks employee="#{employee}" />
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}" />
149 <h:outputText value="#{msg.ADMIN_ADD_EMPLOYEE_MINIMUM_DATA}" />
152 <ui:include src="/WEB-INF/templates/admin/employee/admin_form_employee_data.tpl" />
155 <f:facet name="footer">
156 <p:panelGrid columns="2" layout="grid">
160 value="#{msg.BUTTON_RESET_FORM}"
166 value="#{msg.BUTTON_ADMIN_ADD_EMPLOYEE}"
167 action="#{adminEmployeeController.addEmployee()}"
168 update=":master:form-list-company-employees:employeeList"