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"
125 label="#{msg.LABEL_COMPANIES}"
126 onchange="PF('branchOfficeList').filter()"
128 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
130 <f:converter converterId="BasicCompanyDataConverter" />
133 value="#{basicDataListController.allBasicData}"
135 itemValue="#{basicData}"
136 itemLabel="#{beanHelper.renderBasicData(basicData, true, false)}"
138 </p:selectCheckboxMenu>
142 outcome="admin_show_basic_data"
143 value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true, false)}"
144 title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
146 <f:param name="basicDataId" value="#{branchOffice.branchCompany.basicDataId}" />
151 headerText="#{msg.ADMIN_USER_HEADER}"
152 sortBy="#{branchOffice.branchUserOwner}"
153 filterBy="#{branchOffice.branchUserOwner}"
156 <f:facet name="filter">
157 <p:selectCheckboxMenu
159 filterMatchMode="contains"
160 label="#{msg.LABEL_USERS}"
161 onchange="PF('branchOfficeList').filter()"
163 title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
165 <f:converter converterId="UserConverter" />
168 value="#{userListController.allUsers}"
171 itemLabel="#{beanHelper.renderUser(user)}"
173 </p:selectCheckboxMenu>
177 outcome="admin_show_user"
178 value="#{beanHelper.renderUser(branchOffice.branchUserOwner)}"
179 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
180 rendered="#{not empty branchOffice.branchUserOwner}"
182 <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
186 outcome="admin_assign_branch_office_owner"
187 value="#{msg.ADMIN_LINK_ASSIGN}"
188 title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}"
189 rendered="#{empty branchOffice.branchUserOwner}"
191 <f:param name="branchId" value="#{branchOffice.branchId}" />
196 headerText="#{msg.DATA_EMAIL_ADDRESS}"
197 sortBy="#{branchOffice.branchEmailAddress}"
198 filterBy="#{branchOffice.branchEmailAddress}"
199 filterMatchMode="contains"
202 href="mailto:#{branchOffice.branchEmailAddress}"
203 value="#{branchOffice.branchEmailAddress}"
204 rendered="#{not empty branchOffice.branchEmailAddress}"
207 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
211 headerText="#{msg.DATA_ADDRESS}"
212 sortBy="#{branchOffice.branchCity}"
213 filterBy="#{branchOffice.branchCity}"
214 filterMatchMode="contains"
217 value="#{beanHelper.renderBranchOffice(branchOffice, false)}"
218 title="#{beanHelper.renderBranchOffice(branchOffice, true)}"
223 headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}"
224 sortBy="#{branchOffice.branchContactEmployee}"
225 filterBy="#{branchOffice.branchContactEmployee}"
228 <f:facet name="filter">
229 <p:selectCheckboxMenu
231 filterMatchMode="contains"
232 label="#{msg.LABEL_EMPLOYEES}"
233 onchange="PF('branchOfficeList').filter()"
235 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
237 <f:converter converterId="ContactConverter" />
240 value="#{contactListController.allContacts}"
242 itemValue="#{contact}"
243 itemLabel="#{beanHelper.renderContact(contact)}"
245 </p:selectCheckboxMenu>
249 outcome="admin_show_contact"
250 value="#{beanHelper.renderContact(branchOffice.branchContactEmployee)}"
251 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
252 rendered="#{not empty branchOffice.branchContactEmployee}"
254 <f:param name="contactId" value="#{branchOffice.branchContactEmployee.contactId}" />
258 outcome="admin_assign_branch_office_contact"
259 value="#{msg.ADMIN_LINK_ASSIGN}"
260 title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}"
261 rendered="#{empty branchOffice.branchContactEmployee}"
263 <f:param name="branchId" value="#{branchOffice.branchId}" />
268 headerText="#{msg.ENTRY_CREATED_HEADER}"
269 sortBy="#{branchOffice.branchEntryCreated}"
272 <h:outputText value="#{branchOffice.branchEntryCreated}">
273 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
278 headerText="#{msg.ENTRY_UPDATED_HEADER}"
279 sortBy="#{branchOffice.branchEntryUpdated}"
282 <h:outputText value="#{branchOffice.branchEntryUpdated}">
283 <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
288 headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
292 <p:menuButton value="#{msg.OPTIONS}">
294 outcome="admin_show_branch_office"
295 value="#{msg.ADMIN_LINK_SHOW_SHORT}"
296 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
298 <f:param name="branchId" value="#{branchOffice.branchId}" />
302 outcome="admin_edit_branch_office"
303 value="#{msg.ADMIN_LINK_EDIT_SHORT}"
304 title="#{msg.ADMIN_LINK_EDIT_BRANCH_OFFICE_TITLE}"
306 <f:param name="branchId" value="#{branchOffice.branchId}" />
309 <p:menuitem outcome="admin_delete_branch_office">
311 styleClass="link-danger"
312 value="#{msg.ADMIN_LINK_DELETE_SHORT}"
313 title="#{msg.ADMIN_LINK_DELETE_BRANCH_OFFICE_TITLE}"
315 <f:param name="branchId" value="#{branchOffice.branchId}" />
325 header="#{msg.ADMIN_SINGLE_BRANCH_OFFICE_DETAILS_HEADER}"
328 widgetVar="branchOfficeDialog"
333 <p:outputPanel id="branch-office-details">
335 <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_DATA_TAB_TITLE}">
336 <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
337 <f:facet name="header">
338 <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_BASIC_DETAILS_HEADER}">
339 <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
343 <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
344 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
346 <p:outputLabel value="#{msg.BRANCH_OFFICE_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_NUMBER_TITLE}" />
347 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchNumber}" />
349 <p:outputLabel value="#{msg.ASSIGNED_BASIC_DATA_HEADER}" title="#{msg.ASSIGNED_BASIC_DATA_TO_BRANCH_OFFICE_TITLE}" />
351 outcome="admin_show_basic_data"
353 value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false, true)}"
354 title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
356 <f:param name="basicDataId" value="#{branchOfficeListController.selectedBranchOffice.branchCompany.basicDataId}" />
359 <p:outputLabel value="#{msg.ASSIGNED_CONTACT_PERSON_HEADER}" title="#{msg.ASSIGNED_CONTACT_PERSON_TO_BRANCH_OFFICE_TITLE}" />
361 outcome="admin_show_contact"
363 value="#{beanHelper.renderContact(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}"
364 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
365 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}"
367 <f:param name="contactId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.contactId}" />
369 <h:outputText value="#{msg.NO_CONTACT_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}" />
371 <p:outputLabel value="#{msg.ASSIGNED_OWNER_EMPLOYEE_HEADER}" title="#{msg.ASSIGNED_OWNER_EMPLOYEE_TO_BRANCH_OFFICE_TITLE}" />
373 outcome="admin_show_contact"
375 value="#{beanHelper.renderContact(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}"
376 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}"
377 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}"
379 <f:param name="contactId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.contactId}" />
381 <h:outputText value="#{msg.NO_OWNER_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}" />
383 <p:outputLabel value="#{msg.ASSIGNED_USER_OWNER_HEADER}" title="#{msg.ASSIGNED_USER_OWNER_TO_BRANCH_OFFICE_TITLE}" />
385 outcome="admin_show_user"
387 value="#{beanHelper.renderUser(branchOfficeListController.selectedBranchOffice.branchUserOwner)}"
388 title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
389 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchUserOwner}"
391 <f:param name="userId" value="#{branchOfficeListController.selectedBranchOffice.branchUserOwner.userId}" />
393 <h:outputText value="#{msg.NO_USER_ASSIGNED_AS_OWNER_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchUserOwner}" />
395 <p:outputLabel value="#{msg.EMAIL_ADDRESS_HEADER}" title="#{msg.EMAIL_ADDRESS_OF_BRANCH_OFFICE_TITLE}" />
396 <h:outputLink value="mailto:#{branchOfficeListController.selectedBranchOffice.branchEmailAddress}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
397 <h:outputText value="#{msg.BRANCH_OFFICE_HAS_NO_EMAIL_ADDRESS}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
399 <p:outputLabel value="#{msg.LANDLINE_NUMBER_HEADER}" title="#{msg.ASSIGNED_LANDLINE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
401 outcome="admin_show_landline"
402 value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchLandLineNumber)}"
404 title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}"
405 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}"
407 <f:param name="landLineId" value="#{branchOfficeListController.selectedBranchOffice.branchLandLineNumber.phoneId}" />
409 <h:outputText value="#{msg.NO_LANDLINE_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}" />
411 <p:outputLabel value="#{msg.FAX_NUMBER_HEADER}" title="#{msg.ASSIGNED_FAX_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
413 outcome="admin_show_fax"
414 value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchFaxNumber)}"
416 title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"
417 rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}"
419 <f:param name="faxId" value="#{branchOfficeListController.selectedBranchOffice.branchFaxNumber.phoneId}" />
421 <h:outputText value="#{msg.NO_FAX_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}" />
425 <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_TAB_TITLE}">
426 <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
427 <f:facet name="header">
428 <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_DETAILS_HEADER}">
429 <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
433 <p:outputLabel value="#{msg.STREET_NAME_HEADER}" title="#{msg.STREET_NAME_OF_BRANCH_OFFICE_TITLE}" />
434 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStreet}" />
436 <p:outputLabel value="#{msg.HOUSE_NUMBER_HEADER}" title="#{msg.HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
437 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumber}" />
439 <p:outputLabel value="#{msg.LAST_HOUSE_NUMBER_HEADER}" title="#{msg.LAST_HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
440 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchLastHouseNumber}" />
442 <p:outputLabel value="#{msg.HOUSE_NUMBER_EXTENSION_HEADER}" title="#{msg.HOUSE_NUMBER_EXTENSION_OF_BRANCH_OFFICE_TITLE}" />
443 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumberExtension}" />
445 <p:outputLabel value="#{msg.STORE_HEADER}" title="#{msg.STORE_OF_BRANCH_OFFICE_TITLE}" />
446 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStore}" />
448 <p:outputLabel value="#{msg.SUITE_NUMBER_HEADER}" title="#{msg.SUITE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
449 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchSuiteNumber}" />
451 <p:outputLabel value="#{msg.DATA_ZIP_CODE}" title="#{msg.ZIP_CODE_OF_BRANCH_OFFICE_TITLE}" />
452 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchZipCode}" />
454 <p:outputLabel value="#{msg.CITY_HEADER}" title="#{msg.CITY_OF_BRANCH_OFFICE_TITLE}" />
455 <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchCity}" />
457 <p:outputLabel value="#{msg.COUNTRY_HEADER}" title="#{msg.COUNTRY_OF_BRANCH_OFFICE_TITLE}" />
458 <h:outputText value="#{beanHelper.renderCountry(branchOfficeListController.selectedBranchOffice.branchCountry)}" />
462 <p:tab title="#{msg.ADMIN_OPENING_TIMES_TAB_TITLE}">
463 <core:outputOpeningTimesDataTable
464 id="branchOpeningTimeDetailList"
465 value="#{branchOfficeListController.selectedBranchOffice.branchOpeningTimes}"
467 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
468 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
469 widgetVar="branchOpeningTimeDetailList"
470 headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
483 <f:facet name="header">
484 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
487 <h:panelGroup styleClass="para" layout="block">
488 <h:outputText value="#{msg.ADMIN_BRANCH_OFFICE_MINIMUM_DATA}" />
491 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl" />
493 <f:facet name="footer">
494 <p:panelGrid columns="2" layout="grid">
497 value="#{msg.BUTTON_RESET_FORM}"
502 value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
503 action="#{adminBranchOfficeActionController.addBranchOffice()}"
504 update="form-list-branch-offices:branchOfficeList"
505 oncomplete="PF('branchOfficeList').filter()"
512 <h:form id="form-list-branch-opening-time">
513 <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
514 <core:outputOpeningTimesDataTable
515 id="branchOpeningTimeList"
516 value="#{adminBranchOfficeActionController.branchOpeningTimes}"
518 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
519 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
520 widgetVar="branchOpeningTimeList"
521 headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
531 <f:facet name="header">
532 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME_TITLE}" />
535 <h:panelGroup styleClass="para" layout="block">
536 <h:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
539 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_opening_time.tpl" />
541 <f:facet name="footer">
542 <p:panelGrid columns="2" layout="grid">
545 value="#{msg.BUTTON_RESET_FORM}"
550 value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
551 action="#{adminBranchOfficeActionController.addOpeningTime()}"
552 update="form-list-branch-opening-time:branchOpeningTimeList"