<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:widgets="http://mxchange.org/jsf/core/widgets"
- xmlns:links="http://mxchange.org/jsf/core/links"
- xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- xmlns:p="http://primefaces.org/ui">
-
- <ui:define name="admin_title">
+<ui:composition
+ template="/WEB-INF/templates/admin/admin_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:core="http://mxchange.org/jsf/core/widgets"
+ xmlns:links="http://mxchange.org/jsf/core/links"
+ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+ xmlns:h="http://xmlns.jcp.org/jsf/html"
+ xmlns:f="http://xmlns.jcp.org/jsf/core"
+ xmlns:p="http://primefaces.org/ui"
+ >
+
+ <ui:define name="document_admin_title">
<h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
</ui:define>
<ui:define name="content">
<h:form id="form-list-branch-offices">
<p:dataTable
- id="table-list-branch-offices"
+ id="branchOfficeList"
var="branchOffice"
- value="#{branchOfficeController.allBranchOffices()}"
- tableStyleClass="table table-full"
+ value="#{branchOfficeListController.allBranchOffices()}"
paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
- widgetVar="branchOfficeTable"
- filteredValue="#{branchOfficeController.filteredBranchOffices}"
+ filteredValue="#{branchOfficeListController.filteredBranchOffices}"
rows="10"
+ rowKey="#{branchOffice.branchId}"
reflow="true"
resizableColumns="true"
rowsPerPageTemplate="5,10,20,50,100"
sortMode="multiple"
summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
- emptyMessage="#{msg.ADMIN_BRANCH_OFFICES_LIST_EMPTY}"
+ emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICES}"
widgetVar="branchOfficeList"
+ selectionMode="single"
+ selection="#{branchOfficeListController.selectedBranchOffice}"
+ skipChildren="true"
>
<f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICES_HEADER}" />
- <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
- <p:columnToggler datasource="table-list-branch-offices" trigger="toggler" />
+ <p:panelGrid
+ columns="3"
+ layout="grid"
+ columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
+ >
+ <p:spacer />
+
+ <p:panelGrid
+ columns="2"
+ columnClasses="ui-grid-4,ui-grid-8"
+ layout="grid"
+ styleClass="ui-noborder"
+ >
+ <p:outputLabel
+ for="globalFilter"
+ value="#{msg.SEARCH_ALL_FIELDS}"
+ style="float: right"
+ />
+
+ <p:inputText
+ id="globalFilter"
+ onkeyup="PF('branchOfficeList').filter()"
+ placeholder="#{msg.ENTER_KEYWORD}"
+ />
+ </p:panelGrid>
+
+ <p:outputPanel>
+ <p:spacer height="4" />
+
+ <p:commandButton
+ id="toggler"
+ type="button"
+ value="#{msg.SELECT_SHOWN_COLUMNS}"
+ styleClass="column-selector"
+ />
+
+ <p:columnToggler datasource="branchOfficeList" trigger="toggler" />
+ </p:outputPanel>
+ </p:panelGrid>
</f:facet>
- <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{branchOffice.branchId}" filterBy="#{branchOffice.branchId}">
- <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
+ <p:ajax
+ event="rowSelect"
+ update="form-list-branch-offices:branch-office-details"
+ oncomplete="PF('branchOfficeDialog').show()"
+ />
+
+ <p:column
+ headerText="#{msg.ID_HEADER}"
+ sortBy="#{branchOffice.branchId}"
+ filterable="false"
+ >
+ <p:link
+ outcome="admin_show_branch_office"
+ value="#{branchOffice.branchId}"
+ title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}"
+ >
<f:param name="branchId" value="#{branchOffice.branchId}" />
</p:link>
</p:column>
- <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{branchOffice.branchUserOwner.userName}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
+ <p:column
+ headerText="#{msg.BRANCH_OFFICE_NUMBER_HEADER}"
+ sortBy="#{branchOffice.branchNumber}"
+ filterBy="#{branchOffice.branchNumber}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{branchOffice.branchNumber}" rendered="#{not empty branchOffice.branchNumber}" />
+ <h:outputText value="-" rendered="#{empty branchOffice.branchNumber}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}"
+ sortBy="#{branchOffice.branchCompany}"
+ filterBy="#{branchOffice.branchCompany}"
+ filterMatchMode="in"
+ >
<f:facet name="filter">
- <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_USERS}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}">
- <f:converter converterId="UserConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
+ <p:selectCheckboxMenu
+ filter="true"
+ filterMatchMode="contains"
+ label="#{msg.LABEL_COMPANIES}"
+ onchange="PF('branchOfficeList').filter()"
+ updateLabel="true"
+ title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
+ >
+ <f:converter converterId="BasicCompanyDataConverter" />
+
+ <f:selectItems
+ value="#{basicDataListController.allBasicData}"
+ var="basicData"
+ itemValue="#{basicData}"
+ itemLabel="#{beanHelper.renderBasicData(basicData, true)}"
+ />
</p:selectCheckboxMenu>
</f:facet>
- <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{branchOffice.branchUserOwner.userId}" rendered="#{not empty branchOffice.branchUserOwner}">
- <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
- </p:link>
-
- <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}">
- <f:param name="branchId" value="#{branchOffice.branchId}" />
+ <p:link
+ outcome="admin_show_basic_data"
+ value="#{beanHelper.renderBasicData(branchOffice.branchCompany, true)}"
+ title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
+ >
+ <f:param name="basicDataId" value="#{branchOffice.branchCompany.basicDataId}" />
</p:link>
</p:column>
- <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{branchOffice.branchCompany.companyName}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
+ <p:column
+ headerText="#{msg.ADMIN_USER_HEADER}"
+ sortBy="#{branchOffice.branchUserOwner}"
+ filterBy="#{branchOffice.branchUserOwner}"
+ filterMatchMode="in"
+ >
<f:facet name="filter">
- <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_COMPANIES}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}">
- <f:converter converterId="BasicCompanyDataConverter" />
- <f:selectItems value="#{basicCompanyDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
+ <p:selectCheckboxMenu
+ filter="true"
+ filterMatchMode="contains"
+ label="#{msg.LABEL_USERS}"
+ onchange="PF('branchOfficeList').filter()"
+ updateLabel="true"
+ title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
+ >
+ <f:converter converterId="UserConverter" />
+
+ <f:selectItems
+ value="#{userListController.allUsers}"
+ var="user"
+ itemValue="#{user}"
+ itemLabel="#{beanHelper.renderUser(user)}"
+ />
</p:selectCheckboxMenu>
</f:facet>
- <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
- <h:outputText value="#{branchOffice.branchCompany.companyName}" />
- </h:outputLink>
+ <p:link
+ outcome="admin_show_user"
+ value="#{beanHelper.renderUser(branchOffice.branchUserOwner)}"
+ title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
+ rendered="#{not empty branchOffice.branchUserOwner}"
+ >
+ <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
+ </p:link>
- <h:outputText value="#{branchOffice.branchCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
+ <p:link
+ outcome="admin_assign_branch_office_owner"
+ value="#{msg.ADMIN_LINK_ASSIGN}"
+ title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE}"
+ rendered="#{empty branchOffice.branchUserOwner}"
+ >
+ <f:param name="branchId" value="#{branchOffice.branchId}" />
+ </p:link>
</p:column>
- <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
- <h:outputLink value="mailto:#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
+ <p:column
+ headerText="#{msg.DATA_EMAIL_ADDRESS}"
+ sortBy="#{branchOffice.branchEmailAddress}"
+ filterBy="#{branchOffice.branchEmailAddress}"
+ filterMatchMode="contains"
+ >
+ <p:link
+ href="mailto:#{branchOffice.branchEmailAddress}"
+ value="#{branchOffice.branchEmailAddress}"
+ rendered="#{not empty branchOffice.branchEmailAddress}"
+ />
<h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
</p:column>
- <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
- <h:outputText value="#{branchOffice.branchZipCode} #{branchOffice.branchCity}" title="#{branchOffice.branchStreet} #{branchOffice.branchHouseNumber} (#{msg.DATA_STORE} #{branchOffice.branchStore}, #{msg.DATA_SUITE_NUMBER} #{branchOffice.branchSuiteNumber})" />
+ <p:column
+ headerText="#{msg.DATA_ADDRESS}"
+ sortBy="#{branchOffice.branchCity}"
+ filterBy="#{branchOffice.branchCity}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{beanHelper.renderBranchOffice(branchOffice)}" title="#{beanHelper.renderBranchOffice(branchOffice)}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_CONTACT_PERSON}" sortBy="#{branchOffice.branchContactEmployee.employeePersonalData.contactFamilyName}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
+ <p:column
+ headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}"
+ sortBy="#{branchOffice.branchContactEmployee}"
+ filterBy="#{branchOffice.branchContactEmployee}"
+ filterMatchMode="in"
+ >
<f:facet name="filter">
- <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_COMPANY_EMPLOYEES}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COMPANY_EMPLOYEES_TITLE}">
- <f:converter converterId="CompanyEmployeeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
- <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{employee.employeePersonalData.contactFirstName} #{employee.employeePersonalData.contactFamilyName}" />
+ <p:selectCheckboxMenu
+ filter="true"
+ filterMatchMode="contains"
+ label="#{msg.LABEL_EMPLOYEES}"
+ onchange="PF('branchOfficeList').filter()"
+ updateLabel="true"
+ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
+ >
+ <f:converter converterId="EmployeeConverter" />
+
+ <f:selectItems
+ value="#{employeeController.allEmployees()}"
+ var="employee"
+ itemValue="#{employee}"
+ itemLabel="#{beanHelper.renderEmployee(employee)}"
+ />
</p:selectCheckboxMenu>
</f:facet>
- <p:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
+ <p:link
+ outcome="admin_show_employee"
+ value="#{beanHelper.renderEmployee(branchOffice.branchContactEmployee)}"
+ title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
+ rendered="#{not empty branchOffice.branchContactEmployee}"
+ >
<f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
</p:link>
- <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}">
+ <p:link
+ outcome="admin_assign_branch_office_employee"
+ value="#{msg.ADMIN_LINK_ASSIGN}"
+ title="#{msg.ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE}"
+ rendered="#{empty branchOffice.branchContactEmployee}"
+ >
<f:param name="branchId" value="#{branchOffice.branchId}" />
</p:link>
</p:column>
- <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{branchOffice.branchCreated}">
- <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
- <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
+ <p:column
+ headerText="#{msg.ENTRY_CREATED_HEADER}"
+ sortBy="#{branchOffice.branchCreated}"
+ filterable="false"
+ >
+ <h:outputText id="branchCreated" value="#{branchOffice.branchCreated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</p:column>
- <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false">
- <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
+ <p:column
+ headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
+ sortable="false"
+ filterable="false"
+ >
+ <links:outputBranchOfficeAdminDropdownMenu branchOffice="#{branchOffice}" />
</p:column>
</p:dataTable>
+
+ <p:dialog
+ dynamic="true"
+ modal="true"
+ resizable="false"
+ header="#{msg.ADMIN_SINGLE_BRANCH_OFFICE_DETAILS_HEADER}"
+ hideEffect="fade"
+ showEffect="fade"
+ widgetVar="branchOfficeDialog"
+ position="top"
+ responsive="true"
+ closeOnEscape="true"
+ >
+ <p:outputPanel id="branch-office-details">
+ <p:tabView>
+ <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_DATA_TAB_TITLE}">
+ <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
+ <f:facet name="header">
+ <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_BASIC_DETAILS_HEADER}">
+ <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
+ </h:outputFormat>
+ </f:facet>
+
+ <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.BRANCH_OFFICE_ID_NUMBER_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
+
+ <p:outputLabel value="#{msg.BRANCH_OFFICE_NUMBER_HEADER}" title="#{msg.BRANCH_OFFICE_NUMBER_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchNumber}" />
+
+ <p:outputLabel value="#{msg.ASSIGNED_BASIC_DATA_HEADER}" title="#{msg.ASSIGNED_BASIC_DATA_TO_BRANCH_OFFICE_TITLE}" />
+ <p:link
+ outcome="admin_show_basic_data"
+ target="_blank"
+ value="#{beanHelper.renderBasicData(branchOfficeListController.selectedBranchOffice.branchCompany, false)}"
+ title="#{msg.ADMIN_LINK_SHOW_BASIC_DATA_TITLE}"
+ >
+ <f:param name="basicDataId" value="#{branchOfficeListController.selectedBranchOffice.branchCompany.basicDataId}" />
+ </p:link>
+
+ <p:outputLabel value="#{msg.ASSIGNED_CONTACT_PERSON_HEADER}" title="#{msg.ASSIGNED_CONTACT_PERSON_TO_BRANCH_OFFICE_TITLE}" />
+ <p:link
+ outcome="admin_show_employee"
+ target="_blank"
+ value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchContactEmployee)}"
+ title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}"
+ rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}"
+ >
+ <f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
+ </p:link>
+ <h:outputText value="#{msg.NO_CONTACT_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchContactEmployee}" />
+
+ <p:outputLabel value="#{msg.ASSIGNED_OWNER_EMPLOYEE_HEADER}" title="#{msg.ASSIGNED_OWNER_EMPLOYEE_TO_BRANCH_OFFICE_TITLE}" />
+ <p:link
+ outcome="admin_show_employee"
+ target="_blank"
+ value="#{beanHelper.renderEmployee(branchOfficeListController.selectedBranchOffice.branchOwnerEmployee)}"
+ title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_EMPLOYEE_TITLE}"
+ rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}"
+ >
+ <f:param name="employeeId" value="#{branchOfficeListController.selectedBranchOffice.branchContactEmployee.employeeId}" />
+ </p:link>
+ <h:outputText value="#{msg.NO_OWNER_EMPLOYEE_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchOwnerEmployee}" />
+
+ <p:outputLabel value="#{msg.ASSIGNED_USER_OWNER_HEADER}" title="#{msg.ASSIGNED_USER_OWNER_TO_BRANCH_OFFICE_TITLE}" />
+ <p:link
+ outcome="admin_show_user"
+ target="_blank"
+ value="#{beanHelper.renderUser(branchOfficeListController.selectedBranchOffice.branchUserOwner)}"
+ title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE}"
+ rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchUserOwner}"
+ >
+ <f:param name="userId" value="#{branchOfficeListController.selectedBranchOffice.branchUserOwner.userId}" />
+ </p:link>
+ <h:outputText value="#{msg.NO_USER_ASSIGNED_AS_OWNER_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchUserOwner}" />
+
+ <p:outputLabel value="#{msg.EMAIL_ADDRESS_HEADER}" title="#{msg.EMAIL_ADDRESS_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputLink value="mailto:#{branchOfficeListController.selectedBranchOffice.branchEmailAddress}" rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
+ <h:outputText value="#{msg.BRANCH_OFFICE_HAS_NO_EMAIL_ADDRESS}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchEmailAddress}" />
+
+ <p:outputLabel value="#{msg.LANDLINE_NUMBER_HEADER}" title="#{msg.ASSIGNED_LANDLINE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
+ <p:link
+ outcome="admin_show_landline"
+ value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchLandLineNumber)}"
+ target="_blank"
+ title="#{msg.ADMIN_LINK_SHOW_LAND_LINE_NUMBER_TITLE}"
+ rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}"
+ >
+ <f:param name="phoneId" value="#{branchOfficeListController.selectedBranchOffice.branchLandLineNumber.phoneId}" />
+ </p:link>
+ <h:outputText value="#{msg.NO_LANDLINE_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchLandLineNumber}" />
+
+ <p:outputLabel value="#{msg.FAX_NUMBER_HEADER}" title="#{msg.ASSIGNED_FAX_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
+ <p:link
+ outcome="admin_show_fax"
+ value="#{beanHelper.renderPhoneNumber(branchOfficeListController.selectedBranchOffice.branchFaxNumber)}"
+ target="_blank"
+ title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"
+ rendered="#{not empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}"
+ >
+ <f:param name="phoneId" value="#{branchOfficeListController.selectedBranchOffice.branchFaxNumber.phoneId}" />
+ </p:link>
+ <h:outputText value="#{msg.NO_FAX_NUMBER_ASSIGNED_TO_BRANCH_OFFICE}" rendered="#{empty branchOfficeListController.selectedBranchOffice.branchFaxNumber}" />
+ </p:panelGrid>
+ </p:tab>
+
+ <p:tab title="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_TAB_TITLE}">
+ <p:panelGrid columns="2" rendered="#{not empty branchOfficeListController.selectedBranchOffice}">
+ <f:facet name="header">
+ <h:outputFormat value="#{msg.ADMIN_BRANCH_OFFICE_ADDRESS_DETAILS_HEADER}">
+ <f:param value="#{branchOfficeListController.selectedBranchOffice.branchId}" />
+ </h:outputFormat>
+ </f:facet>
+
+ <p:outputLabel value="#{msg.STREET_NAME_HEADER}" title="#{msg.STREET_NAME_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStreet}" />
+
+ <p:outputLabel value="#{msg.HOUSE_NUMBER_HEADER}" title="#{msg.HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumber}" />
+
+ <p:outputLabel value="#{msg.LAST_HOUSE_NUMBER_HEADER}" title="#{msg.LAST_HOUSE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchLastHouseNumber}" />
+
+ <p:outputLabel value="#{msg.HOUSE_NUMBER_EXTENSION_HEADER}" title="#{msg.HOUSE_NUMBER_EXTENSION_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchHouseNumberExtension}" />
+
+ <p:outputLabel value="#{msg.STORE_HEADER}" title="#{msg.STORE_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchStore}" />
+
+ <p:outputLabel value="#{msg.SUITE_NUMBER_HEADER}" title="#{msg.SUITE_NUMBER_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchSuiteNumber}" />
+
+ <p:outputLabel value="#{msg.DATA_ZIP_CODE}" title="#{msg.ZIP_CODE_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchZipCode}" />
+
+ <p:outputLabel value="#{msg.CITY_HEADER}" title="#{msg.CITY_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{branchOfficeListController.selectedBranchOffice.branchCity}" />
+
+ <p:outputLabel value="#{msg.COUNTRY_HEADER}" title="#{msg.COUNTRY_OF_BRANCH_OFFICE_TITLE}" />
+ <h:outputText value="#{beanHelper.renderCountry(branchOfficeListController.selectedBranchOffice.branchCountry)}" />
+ </p:panelGrid>
+ </p:tab>
+
+ <p:tab title="#{msg.ADMIN_OPENING_TIMES_TAB_TITLE}">
+ <core:outputOpeningTimesDataTable
+ id="branchOpeningTimeDetailList"
+ value="#{branchOfficeListController.selectedBranchOffice.branchOpeningTimes}"
+ rows="10"
+ summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
+ emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
+ widgetVar="branchOpeningTimeDetailList"
+ headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
+ />
+ </p:tab>
+ </p:tabView>
+ </p:outputPanel>
+ </p:dialog>
</h:form>
- <h:form id="form-admin-add-branch-office">
- <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
- <h:panelGroup styleClass="table-header" layout="block">
- <h4>
- <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
- </h4>
- </h:panelGroup>
+ <h:form>
+ <p:panelGrid
+ columns="1"
+ layout="grid"
+ >
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
+ </f:facet>
<h:panelGroup styleClass="para" layout="block">
<h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_MINIMUM_DATA}" />
<ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl" />
- <p:panelGrid columns="2" styleClass="table-footer" layout="block">
- <p:commandButton
- styleClass="reset divider-right"
- type="reset"
- value="#{msg.BUTTON_RESET_FORM}"
- />
+ <f:facet name="footer">
+ <p:panelGrid columns="2" layout="grid">
+ <p:commandButton
+ type="reset"
+ value="#{msg.BUTTON_RESET_FORM}"
+ />
- <p:commandButton
- styleClass="submit"
- type="submit"
- value="#{msg.BUTTON_ADMIN_ADD_BASIC_COMPANY_DATA}"
- action="#{adminBranchOfficeController.addBranchOffice()}"
- update=":master:form-list-branch-offices:table-list-branch-offices"
- />
- </p:panelGrid>
+ <p:commandButton
+ type="submit"
+ value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
+ action="#{adminBranchOfficeController.addBranchOffice()}"
+ update="form-list-branch-offices:branchOfficeList"
+ oncomplete="PF('branchOfficeList').filter()"
+ />
+ </p:panelGrid>
+ </f:facet>
+ </p:panelGrid>
+ </h:form>
+
+ <h:form id="form-list-branch-opening-time">
+ <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
+ <core:outputOpeningTimesDataTable
+ id="branchOpeningTimeList"
+ value="#{adminBranchOfficeController.branchOpeningTimes}"
+ rows="10"
+ summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
+ emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
+ widgetVar="branchOpeningTimeList"
+ headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
+ />
+ </p:fieldset>
+ </h:form>
+
+ <h:form>
+ <p:panelGrid
+ columns="1"
+ layout="grid"
+ >
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME_TITLE}" />
+ </f:facet>
+
+ <h:panelGroup styleClass="para" layout="block">
+ <h:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
+ </h:panelGroup>
+
+ <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_opening_time.tpl" />
+
+ <f:facet name="footer">
+ <p:panelGrid columns="2" layout="grid">
+ <p:commandButton
+ type="reset"
+ value="#{msg.BUTTON_RESET_FORM}"
+ />
+
+ <p:commandButton
+ type="submit"
+ value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
+ action="#{adminBranchOfficeController.addOpeningTime()}"
+ update="form-list-branch-opening-time:branchOpeningTimeList"
+ oncomplete=""
+ />
+ </p:panelGrid>
+ </f:facet>
</p:panelGrid>
</h:form>
</ui:define>