]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/admin/branch_office/admin_branch_office_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / branch_office / admin_branch_office_list.xhtml
index ff66511940c13c3c9b7383622c094df8d33a771c..26522083848e198b08314b0181bd2e8ca06eba05 100644 (file)
@@ -1,12 +1,14 @@
 <?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: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 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}"
-                               filteredValue="#{branchOfficeController.filteredBranchOffices}"
+                               filteredValue="#{branchOfficeListController.filteredBranchOffices}"
                                rows="10"
+                               rowKey="#{branchOffice.branchId}"
                                reflow="true"
                                resizableColumns="true"
                                rowsPerPageTemplate="5,10,20,50,100"
                                summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
                                emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICES}"
                                widgetVar="branchOfficeList"
+                               selectionMode="single"
+                               selection="#{branchOfficeListController.selectedBranchOffice}"
+                               skipChildren="true"
                                >
 
                                <f:facet name="header">
-                                       <p:panelGrid columns="2" columnClasses="ui-grid-col-10, ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
-                                               <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICES_HEADER}" />
-
-                                               <h:panelGroup>
-                                                       <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
-                                                       <p:columnToggler datasource="table-list-branch-offices" trigger="toggler" />
-                                               </h:panelGroup>
+                                       <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}" filterable="false">
-                                       <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}"
+                                                       label="#{msg.LABEL_COMPANIES}"
                                                        onchange="PF('branchOfficeList').filter()"
                                                        updateLabel="true"
-                                                       title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
+                                                       title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_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}" />
+                                                       <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_OFFICE_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}"
+                                                       label="#{msg.LABEL_USERS}"
                                                        onchange="PF('branchOfficeList').filter()"
                                                        updateLabel="true"
-                                                       title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
+                                                       title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
                                                        >
-                                                       <f:converter converterId="BasicCompanyDataConverter" />
-                                                       <f:selectItems value="#{basicCompanyDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
+                                                       <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}" 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"
                                                        updateLabel="true"
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
-                                                       <f:converter converterId="CompanyEmployeeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
-                                                       <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
+                                                       <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_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_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}" filterable="false">
-                                       <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" filterable="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>
-                       <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
+                       <p:panelGrid
+                               columns="1"
+                               layout="grid"
+                               >
                                <f:facet name="header">
                                        <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
                                </f:facet>
                                <f:facet name="footer">
                                        <p:panelGrid columns="2" layout="grid">
                                                <p:commandButton
-                                                       styleClass="reset"
                                                        type="reset"
                                                        value="#{msg.BUTTON_RESET_FORM}"
                                                        />
 
                                                <p:commandButton
-                                                       styleClass="submit"
                                                        type="submit"
-                                                       value="#{msg.BUTTON_ADMIN_ADD_BASIC_COMPANY_DATA}"
+                                                       value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
                                                        action="#{adminBranchOfficeController.addBranchOffice()}"
-                                                       update=":master:form-list-branch-offices:table-list-branch-offices"
+                                                       update="form-list-branch-offices:branchOfficeList"
+                                                       oncomplete="PF('branchOfficeList').filter()"
                                                        />
                                        </p:panelGrid>
                                </f:facet>
 
                <h:form id="form-list-branch-opening-time">
                        <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
-                               <p:dataTable
-                                       id="table-list-branch-opening-time"
-                                       var="openingTime"
+                               <core:outputOpeningTimesDataTable
+                                       id="branchOpeningTimeList"
                                        value="#{adminBranchOfficeController.branchOpeningTimes}"
-                                       tableStyleClass="table table-full"
                                        rows="10"
-                                       reflow="true"
                                        summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
                                        emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
                                        widgetVar="branchOpeningTimeList"
-                                       >
-
-                                       <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}" />
-                                       </f:facet>
-
-                                       <p:column headerText="#{msg.ADMIN_START_WEEK_DAY}">
-                                               <h:outputText value="#{openingTime.openingStartDay.toString()}" />
-                                       </p:column>
-
-                                       <p:column headerText="#{msg.ADMIN_END_WEEK_DAY}">
-                                               <h:outputText value="#{openingTime.openingEndDay.toString()}" />
-                                       </p:column>
-
-                                       <p:column headerText="#{msg.ADMIN_START_TIME}">
-                                               <h:outputText value="#{openingTime.openingStartTime.time}">
-                                                       <f:convertDateTime type="time" timeStyle="short" />
-                                               </h:outputText>
-                                       </p:column>
-
-                                       <p:column headerText="#{msg.ADMIN_END_TIME}">
-                                               <h:outputText value="#{openingTime.openingEndTime.time}">
-                                                       <f:convertDateTime type="time" timeStyle="short" />
-                                               </h:outputText>
-                                       </p:column>
-                               </p:dataTable>
+                                       headerMessage="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}"
+                                       />
                        </p:fieldset>
                </h:form>
 
-               <h:form id="form-admin-add-branch-opening-time">
-                       <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
+               <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:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
                                </h:panelGroup>
 
-                               <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_opening_time.tpl" />
+                               <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
-                                                       styleClass="reset"
                                                        type="reset"
                                                        value="#{msg.BUTTON_RESET_FORM}"
                                                        />
 
                                                <p:commandButton
-                                                       styleClass="submit"
                                                        type="submit"
                                                        value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
                                                        action="#{adminBranchOfficeController.addOpeningTime()}"
-                                                       update=":master:form-list-branch-opening-time:table-list-branch-opening-time"
+                                                       update="form-list-branch-opening-time:branchOpeningTimeList"
+                                                       oncomplete=""
                                                        />
                                        </p:panelGrid>
                                </f:facet>