1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
3 xmlns="http://www.w3.org/1999/xhtml"
4 xmlns:core="http://mxchange.org/jsf/core/widgets"
5 xmlns:links="http://mxchange.org/jsf/core/links"
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">
11 <ui:define name="document_admin_title">
12 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
15 <ui:define name="content_header">
16 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
19 <ui:define name="content">
20 <h:form id="form-list-branch-offices">
24 value="#{branchOfficeController.allBranchOffices()}"
25 tableStyleClass="table table-full"
27 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28 filteredValue="#{branchOfficeController.filteredBranchOffices}"
31 resizableColumns="true"
32 rowsPerPageTemplate="5,10,20,50,100"
34 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
35 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICES}"
36 widgetVar="branchOfficeList"
39 <f:facet name="header">
40 <p:panelGrid columns="2" columnClasses="ui-grid-col-10,ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
41 <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICES_HEADER}" />
44 <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
45 <p:columnToggler datasource="branchOfficeList" trigger="toggler" />
50 <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{branchOffice.branchId}" filterable="false">
51 <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
52 <f:param name="branchId" value="#{branchOffice.branchId}" />
56 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER_HEADER}" sortBy="#{branchOffice.branchUserOwner}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
57 <f:facet name="filter">
60 filterMatchMode="contains"
61 label="#{msg.LABEL_USERS}"
62 onchange="PF('branchOfficeList').filter()"
64 title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
66 <f:converter converterId="UserConverter" />
67 <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
68 </p:selectCheckboxMenu>
71 <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}">
72 <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
75 <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}">
76 <f:param name="branchId" value="#{branchOffice.branchId}" />
80 <p:column headerText="#{msg.ADMIN_BASIC_DATA_COMPANY_NAME_HEADER}" sortBy="#{branchOffice.branchCompany}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
81 <f:facet name="filter">
84 filterMatchMode="contains"
85 label="#{msg.LABEL_COMPANIES}"
86 onchange="PF('branchOfficeList').filter()"
88 title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
90 <f:converter converterId="BasicCompanyDataConverter" />
91 <f:selectItems value="#{basicDataListController.allBasicData}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
92 </p:selectCheckboxMenu>
95 <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
96 <h:outputText value="#{beanHelper.renderBasicData(branchOffice.branchCompany)}" />
99 <h:outputText value="#{beanHelper.renderBasicData(branchOffice.branchCompany)}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
102 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
103 <p:link href="mailto:#{branchOffice.branchEmailAddress}" value="#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
105 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
108 <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
109 <h:outputText value="#{beanHelper.renderBranchOffice(branchOffice)}" title="#{beanHelper.renderBranchOffice(branchOffice)}" />
112 <p:column headerText="#{msg.ADMIN_COMPANY_CONTACT_PERSON_HEADER}" sortBy="#{branchOffice.branchContactEmployee}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
113 <f:facet name="filter">
114 <p:selectCheckboxMenu
116 filterMatchMode="contains"
117 label="#{msg.LABEL_EMPLOYEES}"
118 onchange="PF('branchOfficeList').filter()"
120 title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
122 <f:converter converterId="EmployeeConverter" />
123 <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
124 </p:selectCheckboxMenu>
127 <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}">
128 <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
131 <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}">
132 <f:param name="branchId" value="#{branchOffice.branchId}" />
136 <p:column headerText="#{msg.ENTRY_CREATED_HEADER}" sortBy="#{branchOffice.branchCreated}" filterable="false">
137 <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
138 <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
142 <p:column headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}" sortable="false" filterable="false">
143 <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
149 <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
150 <f:facet name="header">
151 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
154 <h:panelGroup styleClass="para" layout="block">
155 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_MINIMUM_DATA}" />
158 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl" />
160 <f:facet name="footer">
161 <p:panelGrid columns="2" layout="grid">
165 value="#{msg.BUTTON_RESET_FORM}"
171 value="#{msg.BUTTON_ADMIN_ADD_BASIC_DATA}"
172 action="#{adminBranchOfficeController.addBranchOffice()}"
173 update=":master:form-list-branch-offices:branchOfficeList"
180 <h:form id="form-list-branch-opening-time">
181 <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
183 id="branchOpeningTimeList"
185 value="#{adminBranchOfficeController.branchOpeningTimes}"
186 tableStyleClass="table table-full"
189 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
190 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
191 widgetVar="branchOpeningTimeList"
194 <f:facet name="header">
195 <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}" />
198 <p:column headerText="#{msg.ADMIN_START_WEEK_DAY}">
199 <h:outputText value="#{openingTime.openingStartDay.toString()}" />
202 <p:column headerText="#{msg.ADMIN_END_WEEK_DAY}">
203 <h:outputText value="#{openingTime.openingEndDay.toString()}" />
206 <p:column headerText="#{msg.ADMIN_START_TIME}">
207 <h:outputText value="#{openingTime.openingStartTime.time}">
208 <f:convertDateTime type="time" timeStyle="short" />
212 <p:column headerText="#{msg.ADMIN_END_TIME}">
213 <h:outputText value="#{openingTime.openingEndTime.time}">
214 <f:convertDateTime type="time" timeStyle="short" />
221 <h:form id="form-admin-add-branch-opening-time">
222 <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
223 <f:facet name="header">
224 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME_TITLE}" />
227 <h:panelGroup styleClass="para" layout="block">
228 <h:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
231 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_opening_time.tpl" />
233 <f:facet name="footer">
234 <p:panelGrid columns="2" layout="grid">
238 value="#{msg.BUTTON_RESET_FORM}"
244 value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
245 action="#{adminBranchOfficeController.addOpeningTime()}"
246 update=":master:form-list-branch-opening-time:branchOpeningTimeList"