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: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_BRANCH_OFFICES}" />
16 <ui:define name="content_header">
17 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
20 <ui:define name="content">
21 <h:form id="form-list-branch-offices">
25 value="#{branchOfficeListController.allBranchOffices}"
27 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28 filteredValue="#{branchOfficeListController.filteredBranchOffices}"
30 rowKey="#{branchOffice.branchId}"
32 resizableColumns="true"
33 rowsPerPageTemplate="5,10,20,50,100"
35 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
36 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICES}"
37 widgetVar="branchOfficeList"
38 selectionMode="single"
39 selection="#{branchOfficeListController.selectedBranchOffice}"
43 <f:facet name="header">
47 columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
53 columnClasses="ui-grid-4,ui-grid-8"
55 styleClass="ui-noborder"
59 value="#{msg.SEARCH_ALL_FIELDS}"
65 onkeyup="PF('branchOfficeList').filter()"
66 placeholder="#{msg.ENTER_KEYWORD}"
71 <p:spacer height="4" />
76 value="#{msg.SELECT_SHOWN_COLUMNS}"
77 styleClass="column-selector"
80 <p:columnToggler datasource="branchOfficeList" trigger="toggler" />
87 update="form-list-branch-offices:branch-office-details"
88 oncomplete="PF('branchOfficeDialog').show()"
92 headerText="#{msg.ID_HEADER}"
93 sortBy="#{branchOffice.branchId}"
97 outcome="admin_show_branch_office"
98 value="#{branchOffice.branchId}"
99 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
101 <f:param name="branchId" value="#{branchOffice.branchId}" />
106 headerText="#{msg.BRANCH_OFFICE_NUMBER_HEADER}"
107 sortBy="#{branchOffice.branchNumber}"
108 filterBy="#{branchOffice.branchNumber}"
109 filterMatchMode="contains"
111 <h:outputText value="#{branchOffice.branchNumber}" rendered="#{not empty branchOffice.branchNumber}" />
112 <h:outputText value="-" rendered="#{empty branchOffice.branchNumber}" />
116 headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}"
117 sortBy="#{branchOffice.branchCompany}"
118 filterBy="#{branchOffice.branchCompany}"
121 <f:facet name="filter">
122 <p:selectCheckboxMenu
124 filterMatchMode="contains"
126 label="#{msg.LABEL_COMPANIES}"
127 onchange="PF('branchOfficeList').filter()"
129 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
131 <f:converter converterId="BasicCompanyDataConverter" />
134 value="#{basicDataListController.allBasicData}"
136 itemValue="#{basicData}"
137 itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
139 </p:selectCheckboxMenu>
143 outcome="admin_show_basic_data"
144 value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true, false)}"
145 title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
147 <f:param name="basicDataId" value="#{branchOffice.branchCompany.basicDataId}" />
152 headerText="#{msg.ADMIN_USER_HEADER}"
153 sortBy="#{branchOffice.branchUserOwner}"
154 filterBy="#{branchOffice.branchUserOwner}"
157 <f:facet name="filter">
158 <p:selectCheckboxMenu
160 filterMatchMode="contains"
162 label="#{msg.LABEL_USERS}"
163 onchange="PF('branchOfficeList').filter()"
165 title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
167 <f:converter converterId="UserConverter" />
170 value="#{userListController.allUsers}"
173 itemLabel="#{beanHelper.renderUser(user)}"
175 </p:selectCheckboxMenu>
179 outcome="admin_show_user"
180 value="#{beanHelper.renderUser(branchOffice.branchUserOwner)}"
181 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
182 rendered="#{not empty branchOffice.branchUserOwner}"
184 <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
188 outcome="admin_assign_branch_office_owner"
189 value="#{msg.ADMIN_LINK_ASSIGN}"
190 title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}"
191 rendered="#{empty branchOffice.branchUserOwner}"
193 <f:param name="branchId" value="#{branchOffice.branchId}" />
198 headerText="#{msg.DATA_EMAIL_ADDRESS}"
199 sortBy="#{branchOffice.branchEmailAddress}"
200 filterBy="#{branchOffice.branchEmailAddress}"
201 filterMatchMode="contains"
204 href="mailto:#{branchOffice.branchEmailAddress}"
205 value="#{branchOffice.branchEmailAddress}"
206 rendered="#{not empty branchOffice.branchEmailAddress}"
209 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
213 headerText="#{msg.DATA_ADDRESS}"
214 sortBy="#{branchOffice.branchCity}"
215 filterBy="#{branchOffice.branchCity}"
216 filterMatchMode="contains"
219 value="#{beanHelper.renderBranchOffice(branchOffice, false)}"
220 title="#{beanHelper.renderBranchOffice(branchOffice, true)}"
225 headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}"
226 sortBy="#{branchOffice.branchContactEmployee}"
227 filterBy="#{branchOffice.branchContactEmployee}"
230 <f:facet name="filter">
231 <p:selectCheckboxMenu
234 filterMatchMode="contains"
235 label="#{msg.LABEL_EMPLOYEES}"
236 onchange="PF('branchOfficeList').filter()"
238 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
240 <f:converter converterId="ContactConverter" />
243 value="#{contactListController.allContacts}"
245 itemValue="#{contact}"
246 itemLabel="#{beanHelper.renderContact(contact)}"
248 </p:selectCheckboxMenu>
252 outcome="admin_show_contact"
253 value="#{beanHelper.renderContact(branchOffice.branchContactEmployee)}"
254 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
255 rendered="#{not empty branchOffice.branchContactEmployee}"
257 <f:param name="contactId" value="#{branchOffice.branchContactEmployee.contactId}" />
261 outcome="admin_assign_branch_office_contact"
262 value="#{msg.ADMIN_LINK_ASSIGN}"
263 title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}"
264 rendered="#{empty branchOffice.branchContactEmployee}"
266 <f:param name="branchId" value="#{branchOffice.branchId}" />
271 headerText="#{msg.ENTRY_CREATED_HEADER}"
272 sortBy="#{branchOffice.branchEntryCreated}"
275 <h:outputText value="#{branchOffice.branchEntryCreated}">
276 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
281 headerText="#{msg.ENTRY_UPDATED_HEADER}"
282 sortBy="#{branchOffice.branchEntryUpdated}"
285 <h:outputText value="#{branchOffice.branchEntryUpdated}">
286 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
291 headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
295 <p:menuButton value="#{msg.OPTIONS}">
297 outcome="admin_show_branch_office"
298 value="#{msg.ADMIN_LINK_SHOW_SHORT}"
299 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
301 <f:param name="branchId" value="#{branchOffice.branchId}" />
305 outcome="admin_edit_branch_office"
306 value="#{msg.ADMIN_LINK_EDIT_SHORT}"
307 title="#{msg.ADMIN_LINK_EDIT_BRANCH_OFFICE_TITLE}"
309 <f:param name="branchId" value="#{branchOffice.branchId}" />
312 <p:menuitem outcome="admin_delete_branch_office">
314 styleClass="link-danger"
315 value="#{msg.ADMIN_LINK_DELETE_SHORT}"
316 title="#{msg.ADMIN_LINK_DELETE_BRANCH_OFFICE_TITLE}"
318 <f:param name="branchId" value="#{branchOffice.branchId}" />
328 header="#{msg.ADMIN_SINGLE_BRANCH_OFFICE_DETAILS_HEADER}"
331 widgetVar="branchOfficeDialog"
336 <p:outputPanel id="branch-office-details">
338 <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_DATA_TAB_TITLE}">
339 <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
340 <f:facet name="header">
341 <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_BASIC_DETAILS_HEADER}">
342 <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
346 <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
347 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
349 <p:outputLabel value="#{msg.BRANCH_OFFICE_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_NUMBER_TITLE}" />
350 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchNumber}" />
352 <p:outputLabel value="#{msg.ASSIGNED_BASIC_DATA_HEADER}" title="#{msg.ASSIGNED_BASIC_DATA_TO_BRANCH_OFFICE_TITLE}" />
354 outcome="admin_show_basic_data"
356 value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false, true)}"
357 title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
359 <f:param name="basicDataId" value="#{branchOfficeListController.selectedBranchOffice.branchCompany.basicDataId}" />
362 <p:outputLabel value="#{msg.ASSIGNED_CONTACT_PERSON_HEADER}" title="#{msg.ASSIGNED_CONTACT_PERSON_TO_BRANCH_OFFICE_TITLE}" />
364 outcome="admin_show_contact"
366 value="#{beanHelper.renderContact(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}"
367 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
368 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}"
370 <f:param name="contactId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.contactId}" />
372 <h:outputText value="#{msg.NO_CONTACT_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}" />
374 <p:outputLabel value="#{msg.ASSIGNED_OWNER_EMPLOYEE_HEADER}" title="#{msg.ASSIGNED_OWNER_EMPLOYEE_TO_BRANCH_OFFICE_TITLE}" />
376 outcome="admin_show_contact"
378 value="#{beanHelper.renderContact(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}"
379 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}"
380 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}"
382 <f:param name="contactId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.contactId}" />
384 <h:outputText value="#{msg.NO_OWNER_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}" />
386 <p:outputLabel value="#{msg.ASSIGNED_USER_OWNER_HEADER}" title="#{msg.ASSIGNED_USER_OWNER_TO_BRANCH_OFFICE_TITLE}" />
388 outcome="admin_show_user"
390 value="#{beanHelper.renderUser(branchOfficeListController.selectedBranchOffice.branchUserOwner)}"
391 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
392 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchUserOwner}"
394 <f:param name="userId" value="#{branchOfficeListController.selectedBranchOffice.branchUserOwner.userId}" />
396 <h:outputText value="#{msg.NO_USER_ASSIGNED_AS_OWNER_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchUserOwner}" />
398 <p:outputLabel value="#{msg.EMAIL_ADDRESS_HEADER}" title="#{msg.EMAIL_ADDRESS_OF_BRANCH_OFFICE_TITLE}" />
399 <h:outputLink value="mailto:#{branchOfficeListController.selectedBranchOffice.branchEmailAddress}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
400 <h:outputText value="#{msg.BRANCH_OFFICE_HAS_NO_EMAIL_ADDRESS}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
402 <p:outputLabel value="#{msg.LANDLINE_NUMBER_HEADER}" title="#{msg.ASSIGNED_LANDLINE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
404 outcome="admin_show_landline"
405 value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchLandLineNumber)}"
407 title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}"
408 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}"
410 <f:param name="landLineId" value="#{branchOfficeListController.selectedBranchOffice.branchLandLineNumber.phoneId}" />
412 <h:outputText value="#{msg.NO_LANDLINE_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}" />
414 <p:outputLabel value="#{msg.FAX_NUMBER_HEADER}" title="#{msg.ASSIGNED_FAX_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
416 outcome="admin_show_fax"
417 value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchFaxNumber)}"
419 title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"
420 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}"
422 <f:param name="faxId" value="#{branchOfficeListController.selectedBranchOffice.branchFaxNumber.phoneId}" />
424 <h:outputText value="#{msg.NO_FAX_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}" />
428 <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_TAB_TITLE}">
429 <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
430 <f:facet name="header">
431 <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_DETAILS_HEADER}">
432 <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
436 <p:outputLabel value="#{msg.STREET_NAME_HEADER}" title="#{msg.STREET_NAME_OF_BRANCH_OFFICE_TITLE}" />
437 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStreet}" />
439 <p:outputLabel value="#{msg.HOUSE_NUMBER_HEADER}" title="#{msg.HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
440 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumber}" />
442 <p:outputLabel value="#{msg.LAST_HOUSE_NUMBER_HEADER}" title="#{msg.LAST_HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
443 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchLastHouseNumber}" />
445 <p:outputLabel value="#{msg.HOUSE_NUMBER_EXTENSION_HEADER}" title="#{msg.HOUSE_NUMBER_EXTENSION_OF_BRANCH_OFFICE_TITLE}" />
446 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumberExtension}" />
448 <p:outputLabel value="#{msg.STORE_HEADER}" title="#{msg.STORE_OF_BRANCH_OFFICE_TITLE}" />
449 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStore}" />
451 <p:outputLabel value="#{msg.SUITE_NUMBER_HEADER}" title="#{msg.SUITE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
452 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchSuiteNumber}" />
454 <p:outputLabel value="#{msg.DATA_ZIP_CODE}" title="#{msg.ZIP_CODE_OF_BRANCH_OFFICE_TITLE}" />
455 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchZipCode}" />
457 <p:outputLabel value="#{msg.CITY_HEADER}" title="#{msg.CITY_OF_BRANCH_OFFICE_TITLE}" />
458 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchCity}" />
460 <p:outputLabel value="#{msg.COUNTRY_HEADER}" title="#{msg.COUNTRY_OF_BRANCH_OFFICE_TITLE}" />
461 <h:outputText value="#{beanHelper.renderCountry(branchOfficeListController.selectedBranchOffice.branchCountry)}" />
465 <p:tab title="#{msg.ADMIN_OPENING_TIMES_TAB_TITLE}">
466 <core:outputOpeningTimesDataTable
467 id="branchOpeningTimeDetailList"
468 value="#{branchOfficeListController.selectedBranchOffice.branchOpeningTimes}"
470 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
471 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
472 widgetVar="branchOpeningTimeDetailList"
473 headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
486 <f:facet name="header">
487 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
490 <h:panelGroup styleClass="para" layout="block">
491 <h:outputText value="#{msg.ADMIN_BRANCH_OFFICE_MINIMUM_DATA}" />
494 <ui:include src="/WEB-INF/templates/admin/business/branch_office/admin_form_branch_office_data.tpl" />
496 <f:facet name="footer">
497 <p:panelGrid columns="2" layout="grid">
500 value="#{msg.BUTTON_RESET_FORM}"
505 value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
506 action="#{adminBranchOfficeActionController.addBranchOffice()}"
507 update="form-list-branch-offices:branchOfficeList"
508 oncomplete="PF('branchOfficeList').filter()"
515 <h:form id="form-list-branch-opening-time">
516 <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
517 <core:outputOpeningTimesDataTable
518 id="branchOpeningTimeList"
519 value="#{adminBranchOfficeActionController.branchOpeningTimes}"
521 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
522 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
523 widgetVar="branchOpeningTimeList"
524 headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
534 <f:facet name="header">
535 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME_TITLE}" />
538 <h:panelGroup styleClass="para" layout="block">
539 <h:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
542 <ui:include src="/WEB-INF/templates/admin/business/branch_office/admin_form_branch_opening_time.tpl" />
544 <f:facet name="footer">
545 <p:panelGrid columns="2" layout="grid">
548 value="#{msg.BUTTON_RESET_FORM}"
553 value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
554 action="#{adminBranchOfficeActionController.addOpeningTime()}"
555 update="form-list-branch-opening-time:branchOpeningTimeList"