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_BRANCH_OFFICES}" />
15 <ui:define name="content_header">
16 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
19 <ui:define name="content">
20 <h:form id="form-list-branch-offices">
24 value="#{branchOfficeController.allBranchOffices()}"
25 tableStyleClass="table table-full"
27 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28 filteredValue="#{branchOfficeController.filteredBranchOffices}"
31 resizableColumns="true"
32 rowsPerPageTemplate="5,10,20,50,100"
34 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
35 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICES}"
36 widgetVar="branchOfficeList"
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_BRANCH_OFFICES_HEADER}" />
44 <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
45 <p:columnToggler datasource="branchOfficeList" trigger="toggler" />
50 <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{branchOffice.branchId}" filterable="false">
51 <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
52 <f:param name="branchId" value="#{branchOffice.branchId}" />
56 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER_HEADER}" sortBy="#{branchOffice.branchUserOwner}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
57 <f:facet name="filter">
60 filterMatchMode="contains"
61 label="#{msg.LABEL_USERS}"
62 onchange="PF('branchOfficeList').filter()"
64 title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
66 <f:converter converterId="UserConverter" />
67 <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
68 <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
69 </p:selectCheckboxMenu>
72 <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}" value="#{branchOffice.branchUserOwner.userId}" rendered="#{not empty branchOffice.branchUserOwner}">
73 <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
76 <p:link outcome="admin_assign_branch_office_owner" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchUserOwner}">
77 <f:param name="branchId" value="#{branchOffice.branchId}" />
81 <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}" sortBy="#{branchOffice.branchCompany}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
82 <f:facet name="filter">
85 filterMatchMode="contains"
86 label="#{msg.LABEL_COMPANIES}"
87 onchange="PF('branchOfficeList').filter()"
89 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
91 <f:converter converterId="BasicCompanyDataConverter" />
92 <f:selectItems value="#{basicDataListController.allBasicData}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
93 </p:selectCheckboxMenu>
96 <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
97 <h:outputText value="#{beanHelper.renderBasicData(branchOffice.branchCompany)}" />
100 <h:outputText value="#{beanHelper.renderBasicData(branchOffice.branchCompany)}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
103 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
104 <p:link href="mailto:#{branchOffice.branchEmailAddress}" value="#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
106 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
109 <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
110 <h:outputText value="#{beanHelper.renderBranchOffice(branchOffice)}" title="#{beanHelper.renderBranchOffice(branchOffice)}" />
113 <p:column headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}" sortBy="#{branchOffice.branchContactEmployee}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
114 <f:facet name="filter">
115 <p:selectCheckboxMenu
117 filterMatchMode="contains"
118 label="#{msg.LABEL_EMPLOYEES}"
119 onchange="PF('branchOfficeList').filter()"
121 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
123 <f:converter converterId="EmployeeConverter" />
124 <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
125 <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
126 </p:selectCheckboxMenu>
129 <p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
130 <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
133 <p:link outcome="admin_assign_branch_office_employee" title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{msg.ADMIN_LINK_ASSIGN}" rendered="#{empty branchOffice.branchContactEmployee}">
134 <f:param name="branchId" value="#{branchOffice.branchId}" />
138 <p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{branchOffice.branchCreated}" filterable="false">
139 <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
140 <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
144 <p:column headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" filterable="false">
145 <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
151 <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
152 <f:facet name="header">
153 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
156 <h:panelGroup styleClass="para" layout="block">
157 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_MINIMUM_DATA}" />
160 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl" />
162 <f:facet name="footer">
163 <p:panelGrid columns="2" layout="grid">
167 value="#{msg.BUTTON_RESET_FORM}"
173 value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
174 action="#{adminBranchOfficeController.addBranchOffice()}"
175 update=":master:form-list-branch-offices:branchOfficeList"
182 <h:form id="form-list-branch-opening-time">
183 <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
185 id="branchOpeningTimeList"
187 value="#{adminBranchOfficeController.branchOpeningTimes}"
188 tableStyleClass="table table-full"
191 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
192 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
193 widgetVar="branchOpeningTimeList"
196 <f:facet name="header">
197 <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}" />
200 <p:column headerText="#{msg.ADMIN_START_WEEK_DAY}">
201 <h:outputText value="#{openingTime.openingStartDay.toString()}" />
204 <p:column headerText="#{msg.ADMIN_END_WEEK_DAY}">
205 <h:outputText value="#{openingTime.openingEndDay.toString()}" />
208 <p:column headerText="#{msg.ADMIN_START_TIME}">
209 <h:outputText value="#{openingTime.openingStartTime.time}">
210 <f:convertDateTime type="time" timeStyle="short" />
214 <p:column headerText="#{msg.ADMIN_END_TIME}">
215 <h:outputText value="#{openingTime.openingEndTime.time}">
216 <f:convertDateTime type="time" timeStyle="short" />
223 <h:form id="form-admin-add-branch-opening-time">
224 <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
225 <f:facet name="header">
226 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME_TITLE}" />
229 <h:panelGroup styleClass="para" layout="block">
230 <h:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
233 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_opening_time.tpl" />
235 <f:facet name="footer">
236 <p:panelGrid columns="2" layout="grid">
240 value="#{msg.BUTTON_RESET_FORM}"
246 value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
247 action="#{adminBranchOfficeController.addOpeningTime()}"
248 update=":master:form-list-branch-opening-time:branchOpeningTimeList"