]> 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 9c91c1849eadf58a0beb95be4793b3cc1f0a5b67..1b0fca22400dcdc80bcde1ad33d386208ff8cd4b 100644 (file)
@@ -8,7 +8,7 @@
                                xmlns:f="http://xmlns.jcp.org/jsf/core"
                                xmlns:p="http://primefaces.org/ui">
 
-       <ui:define name="admin_title">
+       <ui:define name="document_admin_title">
                <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
        </ui:define>
 
@@ -25,7 +25,6 @@
                                tableStyleClass="table table-full"
                                paginator="true"
                                paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
-                               widgetVar="branchOfficeTable"
                                filteredValue="#{branchOfficeController.filteredBranchOffices}"
                                rows="10"
                                reflow="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"
                                >
 
                                <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="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>
                                </f:facet>
 
-                               <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{branchOffice.branchId}" filterBy="#{branchOffice.branchId}">
+                               <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}">
                                                <f:param name="branchId" value="#{branchOffice.branchId}" />
                                        </p:link>
 
                                <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{branchOffice.branchUserOwner.userName}" filterBy="#{branchOffice.branchUserOwner}" 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}">
+                                               <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:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
                                                </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}">
+                                       <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:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{branchOffice.branchCompany.companyName}" filterBy="#{branchOffice.branchCompany}" 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}">
+                                               <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="#{basicCompanyDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
                                                </p:selectCheckboxMenu>
                                        <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>
 
-                               <p:column headerText="#{msg.ADMIN_CONTACT_PERSON}" sortBy="#{branchOffice.branchContactEmployee.employeePersonalData.contactFamilyName}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
+                               <p:column headerText="#{msg.ADMIN_CONTACT_PERSON}" sortBy="#{branchOffice.branchContactEmployee.employeePersonalData}" 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}">
+                                               <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="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}" />
+                                                       <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" 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" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
                                                <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
                                        </p:link>
 
                                        </p:link>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{branchOffice.branchCreated}">
+                               <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" />
                                        </h:outputText>
                                </p:column>
 
-                               <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false">
+                               <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false" filterable="false">
                                        <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
                                </p:column>
                        </p:dataTable>
                </h:form>
 
-               <h:form id="form-admin-add-branch-office">
+               <h:form>
                        <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>
+                               <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}"
-                                               />
-
-                                       <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>
+                               <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}"
+                                                       action="#{adminBranchOfficeController.addBranchOffice()}"
+                                                       update=":master:form-list-branch-offices:table-list-branch-offices"
+                                                       />
+                                       </p:panelGrid>
+                               </f:facet>
                        </p:panelGrid>
                </h:form>
        </ui:define>