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:core="http://mxchange.org/jsf/core/widgets"
6 xmlns:links="http://mxchange.org/jsf/core/links"
7 xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
8 xmlns:h="http://xmlns.jcp.org/jsf/html"
9 xmlns:f="http://xmlns.jcp.org/jsf/core"
10 xmlns:p="http://primefaces.org/ui"
13 <ui:define name="document_admin_title">
14 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
17 <ui:define name="content_header">
18 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
21 <ui:define name="content">
22 <h:form id="form-list-branch-offices">
26 value="#{branchOfficeListController.allBranchOffices()}"
28 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
29 filteredValue="#{branchOfficeListController.filteredBranchOffices}"
31 rowKey="#{branchOffice.branchId}"
33 resizableColumns="true"
34 rowsPerPageTemplate="5,10,20,50,100"
36 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
37 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICES}"
38 widgetVar="branchOfficeList"
39 selectionMode="single"
40 selection="#{branchOfficeListController.selectedBranchOffice}"
44 <f:facet name="header">
48 columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
54 columnClasses="ui-grid-4,ui-grid-8"
56 styleClass="ui-noborder"
58 <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
59 <p:inputText id="globalFilter" onkeyup="PF('branchOfficeList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
63 <p:spacer height="4" />
68 value="#{msg.SELECT_SHOWN_COLUMNS}"
69 styleClass="column-selector"
72 <p:columnToggler datasource="branchOfficeList" trigger="toggler" />
79 update=":master:form-list-branch-offices:branchOffice-details"
80 oncomplete="PF('branchOfficeDialog').show()"
83 <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{branchOffice.branchId}" filterable="false">
84 <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
85 <f:param name="branchId" value="#{branchOffice.branchId}" />
89 <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}" sortBy="#{branchOffice.branchCompany}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
90 <f:facet name="filter">
93 filterMatchMode="contains"
94 label="#{msg.LABEL_COMPANIES}"
95 onchange="PF('branchOfficeList').filter()"
97 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
99 <f:converter converterId="BasicCompanyDataConverter" />
100 <f:selectItems value="#{basicDataListController.allBasicData}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
101 </p:selectCheckboxMenu>
104 <p:link outcome="admin_show_basic_data" value="#{beanHelper.renderBasicData(branchOffice.branchCompany)}" title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}">
105 <f:param name="basicDataId" value="#{branchOffice.branchCompany.basicDataId}" />
109 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER_HEADER}" sortBy="#{branchOffice.branchUserOwner}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
110 <f:facet name="filter">
111 <p:selectCheckboxMenu
113 filterMatchMode="contains"
114 label="#{msg.LABEL_USERS}"
115 onchange="PF('branchOfficeList').filter()"
117 title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
119 <f:converter converterId="UserConverter" />
120 <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
121 </p:selectCheckboxMenu>
124 <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}" value="#{beanHelper.renderUser(branchOffice.branchUserOwner)}" rendered="#{not empty branchOffice.branchUserOwner}">
125 <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
128 <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}">
129 <f:param name="branchId" value="#{branchOffice.branchId}" />
133 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
134 <p:link href="mailto:#{branchOffice.branchEmailAddress}" value="#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
136 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
139 <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
140 <h:outputText value="#{beanHelper.renderBranchOffice(branchOffice)}" title="#{beanHelper.renderBranchOffice(branchOffice)}" />
143 <p:column headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}" sortBy="#{branchOffice.branchContactEmployee}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
144 <f:facet name="filter">
145 <p:selectCheckboxMenu
147 filterMatchMode="contains"
148 label="#{msg.LABEL_EMPLOYEES}"
149 onchange="PF('branchOfficeList').filter()"
151 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
153 <f:converter converterId="EmployeeConverter" />
154 <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
155 </p:selectCheckboxMenu>
158 <p:link outcome="admin_show_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee)}" rendered="#{not empty branchOffice.branchContactEmployee}">
159 <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
162 <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}">
163 <f:param name="branchId" value="#{branchOffice.branchId}" />
167 <p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{branchOffice.branchCreated}" filterable="false">
168 <h:outputText id="branchCreated" value="#{branchOffice.branchCreated}">
169 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
173 <p:column headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" filterable="false">
174 <links:outputBranchOfficeAdminDropdownMenu branchOffice="#{branchOffice}" />
182 header="#{msg.ADMIN_SINGLE_BRANCH_OFFICE_DETAILS_HEADER}"
185 widgetVar="branchOfficeDialog"
189 <p:outputPanel id="branchOffice-details">
191 <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_DATA_TAB_TITLE}">
192 <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
193 <f:facet name="header">
194 <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_BASIC_DETAILS_HEADER}">
195 <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
199 <p:outputLabel value="#{msg.ID_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
200 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
202 <p:outputLabel value="#{msg.BRANCH_OFFICE_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_NUMBER_TITLE}" />
203 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchNumber}" />
205 <p:outputLabel value="#{msg.ASSIGNED_BASIC_DATA_HEADER}" title="#{msg.ASSIGNED_BASIC_DATA_TO_BRANCH_OFFICE_TITLE}" />
206 <p:link outcome="admin_show_basic_data" target="_blank" value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany)}" title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}">
207 <f:param name="basicDataId" value="#{branchOfficeListController.selectedBranchOffice.branchCompany.basicDataId}" />
210 <p:outputLabel value="#{msg.ASSIGNED_CONTACT_PERSON_HEADER}" title="#{msg.ASSIGNED_CONTACT_PERSON_TO_BRANCH_OFFICE_TITLE}" />
211 <p:link outcome="admin_show_employee" target="_blank" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}">
212 <f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
214 <h:outputText value="#{msg.NO_CONTACT_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}" />
216 <p:outputLabel value="#{msg.ASSIGNED_OWNER_EMPLOYEE_HEADER}" title="#{msg.ASSIGNED_OWNER_EMPLOYEE_TO_BRANCH_OFFICE_TITLE}" />
217 <p:link outcome="admin_show_employee" target="_blank" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}" value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}">
218 <f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
220 <h:outputText value="#{msg.NO_OWNER_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}" />
222 <p:outputLabel value="#{msg.ASSIGNED_USER_OWNER_HEADER}" title="#{msg.ASSIGNED_USER_OWNER_TO_BRANCH_OFFICE_TITLE}" />
223 <p:link outcome="admin_show_user" target="_blank" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}" value="#{beanHelper.renderUser(branchOfficeListController.selectedBranchOffice.branchUserOwner)}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchUserOwner}">
224 <f:param name="userId" value="#{branchOfficeListController.selectedBranchOffice.branchUserOwner.userId}" />
226 <h:outputText value="#{msg.NO_USER_ASSIGNED_AS_OWNER_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchUserOwner}" />
228 <p:outputLabel value="#{msg.EMAIL_ADDRESS_HEADER}" title="#{msg.EMAIL_ADDRESS_OF_BRANCH_OFFICE_TITLE}" />
229 <h:outputLink value="mailto:#{branchOfficeListController.selectedBranchOffice.branchEmailAddress}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
230 <h:outputText value="#{msg.BRANCH_OFFICE_HAS_NO_EMAIL_ADDRESS}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
232 <p:outputLabel value="#{msg.LANDLINE_NUMBER_HEADER}" title="#{msg.ASSIGNED_LANDLINE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
234 outcome="admin_show_landline"
235 value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchLandLineNumber)}"
237 title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}"
238 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}"
240 <f:param name="phoneId" value="#{branchOfficeListController.selectedBranchOffice.branchLandLineNumber.phoneId}" />
242 <h:outputText value="#{msg.NO_LANDLINE_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}" />
244 <p:outputLabel value="#{msg.FAX_NUMBER_HEADER}" title="#{msg.ASSIGNED_FAX_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
246 outcome="admin_show_fax"
247 value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchFaxNumber)}"
249 title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"
250 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}"
252 <f:param name="phoneId" value="#{branchOfficeListController.selectedBranchOffice.branchFaxNumber.phoneId}" />
254 <h:outputText value="#{msg.NO_FAX_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}" />
258 <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_TAB_TITLE}">
259 <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
260 <f:facet name="header">
261 <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_DETAILS_HEADER}">
262 <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
266 <p:outputLabel value="#{msg.STREET_NAME_HEADER}" title="#{msg.STREET_NAME_OF_BRANCH_OFFICE_TITLE}" />
267 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStreet}" />
269 <p:outputLabel value="#{msg.HOUSE_NUMBER_HEADER}" title="#{msg.HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
270 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumber}" />
272 <p:outputLabel value="#{msg.LAST_HOUSE_NUMBER_HEADER}" title="#{msg.LAST_HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
273 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchLastHouseNumber}" />
275 <p:outputLabel value="#{msg.HOUSE_NUMBER_EXTENSION_HEADER}" title="#{msg.HOUSE_NUMBER_EXTENSION_OF_BRANCH_OFFICE_TITLE}" />
276 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumberExtension}" />
278 <p:outputLabel value="#{msg.STORE_HEADER}" title="#{msg.STORE_OF_BRANCH_OFFICE_TITLE}" />
279 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStore}" />
281 <p:outputLabel value="#{msg.SUITE_NUMBER_HEADER}" title="#{msg.SUITE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
282 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchSuiteNumber}" />
284 <p:outputLabel value="#{msg.ZIP_CODE_HEADER}" title="#{msg.ZIP_CODE_OF_BRANCH_OFFICE_TITLE}" />
285 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchZipCode}" />
287 <p:outputLabel value="#{msg.CITY_HEADER}" title="#{msg.CITY_OF_BRANCH_OFFICE_TITLE}" />
288 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchCity}" />
290 <p:outputLabel value="#{msg.COUNTRY_HEADER}" title="#{msg.COUNTRY_OF_BRANCH_OFFICE_TITLE}" />
291 <h:outputText value="#{beanHelper.renderCountry(branchOfficeListController.selectedBranchOffice.branchCountry)}" />
295 <p:tab title="#{msg.ADMIN_OPENING_TIMES_TAB_TITLE}">
296 <core:outputOpeningTimesDataTable
297 id="branchOpeningTimeDetailList"
298 value="#{branchOfficeListController.selectedBranchOffice.branchOpeningTimes}"
300 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
301 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
302 widgetVar="branchOpeningTimeDetailList"
303 headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
311 <h:form id="form-add-branch-office">
316 <f:facet name="header">
317 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
320 <h:panelGroup styleClass="para" layout="block">
321 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_MINIMUM_DATA}" />
324 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl" />
326 <f:facet name="footer">
327 <p:panelGrid columns="2" layout="grid">
330 value="#{msg.BUTTON_RESET_FORM}"
336 value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
337 action="#{adminBranchOfficeController.addBranchOffice()}"
338 update=":master:form-list-branch-offices:branchOfficeList"
339 oncomplete="PF('branchOfficeList').filter()"
346 <h:form id="form-list-branch-opening-time">
347 <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
348 <core:outputOpeningTimesDataTable
349 id="branchOpeningTimeList"
350 value="#{adminBranchOfficeController.branchOpeningTimes}"
352 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
353 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
354 widgetVar="branchOpeningTimeList"
355 headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
360 <h:form id="form-admin-add-branch-opening-time">
365 <f:facet name="header">
366 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME_TITLE}" />
369 <h:panelGroup styleClass="para" layout="block">
370 <h:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
373 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_opening_time.tpl" />
375 <f:facet name="footer">
376 <p:panelGrid columns="2" layout="grid">
379 value="#{msg.BUTTON_RESET_FORM}"
385 value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
386 action="#{adminBranchOfficeController.addOpeningTime()}"
387 update=":master:form-list-branch-opening-time:branchOpeningTimeList"