]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/branch_office/admin_branch_office_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / branch_office / admin_branch_office_list.xhtml
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:widgets="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">
10
11         <ui:define name="document_admin_title">
12                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
13         </ui:define>
14
15         <ui:define name="content_header">
16                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
17         </ui:define>
18
19         <ui:define name="content">
20                 <h:form id="form-list-branch-offices">
21                         <p:dataTable
22                                 id="table-list-branch-offices"
23                                 var="branchOffice"
24                                 value="#{branchOfficeController.allBranchOffices()}"
25                                 tableStyleClass="table table-full"
26                                 paginator="true"
27                                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
28                                 filteredValue="#{branchOfficeController.filteredBranchOffices}"
29                                 rows="10"
30                                 reflow="true"
31                                 resizableColumns="true"
32                                 rowsPerPageTemplate="5,10,20,50,100"
33                                 sortMode="multiple"
34                                 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}"
35                                 emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICES}"
36                                 widgetVar="branchOfficeList"
37                                 >
38
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}" />
42
43                                                 <h:panelGroup>
44                                                         <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
45                                                         <p:columnToggler datasource="table-list-branch-offices" trigger="toggler" />
46                                                 </h:panelGroup>
47                                         </p:panelGrid>
48                                 </f:facet>
49
50                                 <p:column headerText="#{msg.ADMIN_ID_NUMBER}" 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}" />
53                                         </p:link>
54                                 </p:column>
55
56                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{branchOffice.branchUserOwner.userName}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
57                                         <f:facet name="filter">
58                                                 <p:selectCheckboxMenu
59                                                         filter="true"
60                                                         filterMatchMode="contains"
61                                                         label="#{msg.LABEL_USERS}"
62                                                         onchange="PF('branchOfficeList').filter()"
63                                                         updateLabel="true"
64                                                         title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
65                                                         >
66                                                         <f:converter converterId="UserConverter" />
67                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
68                                                         <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
69                                                 </p:selectCheckboxMenu>
70                                         </f:facet>
71
72                                         <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}">
73                                                 <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
74                                         </p:link>
75
76                                         <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}">
77                                                 <f:param name="branchId" value="#{branchOffice.branchId}" />
78                                         </p:link>
79                                 </p:column>
80
81                                 <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{branchOffice.branchCompany.companyName}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
82                                         <f:facet name="filter">
83                                                 <p:selectCheckboxMenu
84                                                         filter="true"
85                                                         filterMatchMode="contains"
86                                                         label="#{msg.LABEL_COMPANIES}"
87                                                         onchange="PF('branchOfficeList').filter()"
88                                                         updateLabel="true"
89                                                         title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}"
90                                                         >
91                                                         <f:converter converterId="BasicCompanyDataConverter" />
92                                                         <f:selectItems value="#{basicCompanyDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
93                                                 </p:selectCheckboxMenu>
94                                         </f:facet>
95
96                                         <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
97                                                 <h:outputText value="#{branchOffice.branchCompany.companyName}" />
98                                         </h:outputLink>
99
100                                         <h:outputText value="#{branchOffice.branchCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
101                                 </p:column>
102
103                                 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
104                                         <h:outputLink value="mailto:#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
105
106                                         <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
107                                 </p:column>
108
109                                 <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
110                                         <h:outputText value="#{branchOffice.branchZipCode} #{branchOffice.branchCity}" title="#{branchOffice.branchStreet} #{branchOffice.branchHouseNumber} (#{msg.DATA_STORE} #{branchOffice.branchStore}, #{msg.DATA_SUITE_NUMBER} #{branchOffice.branchSuiteNumber})" />
111                                 </p:column>
112
113                                 <p:column headerText="#{msg.ADMIN_CONTACT_PERSON}" sortBy="#{branchOffice.branchContactEmployee.employeePersonalData}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
114                                         <f:facet name="filter">
115                                                 <p:selectCheckboxMenu
116                                                         filter="true"
117                                                         filterMatchMode="contains"
118                                                         label="#{msg.LABEL_EMPLOYEES}"
119                                                         onchange="PF('branchOfficeList').filter()"
120                                                         updateLabel="true"
121                                                         title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
122                                                         >
123                                                         <f:converter converterId="CompanyEmployeeConverter" />
124                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
125                                                         <f:selectItems value="#{employeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
126                                                 </p:selectCheckboxMenu>
127                                         </f:facet>
128
129                                         <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}">
130                                                 <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
131                                         </p:link>
132
133                                         <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}">
134                                                 <f:param name="branchId" value="#{branchOffice.branchId}" />
135                                         </p:link>
136                                 </p:column>
137
138                                 <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{branchOffice.branchCreated}" filterable="false">
139                                         <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
140                                                 <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
141                                         </h:outputText>
142                                 </p:column>
143
144                                 <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false" filterable="false">
145                                         <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
146                                 </p:column>
147                         </p:dataTable>
148                 </h:form>
149
150                 <h:form>
151                         <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
152                                 <f:facet name="header">
153                                         <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
154                                 </f:facet>
155
156                                 <h:panelGroup styleClass="para" layout="block">
157                                         <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_MINIMUM_DATA}" />
158                                 </h:panelGroup>
159
160                                 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl" />
161
162                                 <f:facet name="footer">
163                                         <p:panelGrid columns="2" layout="grid">
164                                                 <p:commandButton
165                                                         styleClass="reset"
166                                                         type="reset"
167                                                         value="#{msg.BUTTON_RESET_FORM}"
168                                                         />
169
170                                                 <p:commandButton
171                                                         styleClass="submit"
172                                                         type="submit"
173                                                         value="#{msg.BUTTON_ADMIN_ADD_BASIC_COMPANY_DATA}"
174                                                         action="#{adminBranchOfficeController.addBranchOffice()}"
175                                                         update=":master:form-list-branch-offices:table-list-branch-offices"
176                                                         />
177                                         </p:panelGrid>
178                                 </f:facet>
179                         </p:panelGrid>
180                 </h:form>
181
182                 <h:form id="form-list-branch-opening-time">
183                         <p:fieldset legend="#{msg.ADMIN_BRANCH_OFFICE_OPENING_TIMES_LEGEND}">
184                                 <p:dataTable
185                                         id="table-list-branch-opening-time"
186                                         var="openingTime"
187                                         value="#{adminBranchOfficeController.branchOpeningTimes}"
188                                         tableStyleClass="table table-full"
189                                         rows="10"
190                                         reflow="true"
191                                         summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES}"
192                                         emptyMessage="#{msg.ADMIN_EMPTY_LIST_BRANCH_OFFICE_OPENING_TIMES}"
193                                         widgetVar="branchOpeningTimeList"
194                                         >
195
196                                         <f:facet name="header">
197                                                 <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICE_OPENING_TIMES_HEADER}" />
198                                         </f:facet>
199
200                                         <p:column headerText="#{msg.ADMIN_START_WEEK_DAY}">
201                                                 <h:outputText value="#{openingTime.openingStartDay.toString()}" />
202                                         </p:column>
203
204                                         <p:column headerText="#{msg.ADMIN_END_WEEK_DAY}">
205                                                 <h:outputText value="#{openingTime.openingEndDay.toString()}" />
206                                         </p:column>
207
208                                         <p:column headerText="#{msg.ADMIN_START_TIME}">
209                                                 <h:outputText value="#{openingTime.openingStartTime.time}">
210                                                         <f:convertDateTime type="time" timeStyle="short" />
211                                                 </h:outputText>
212                                         </p:column>
213
214                                         <p:column headerText="#{msg.ADMIN_END_TIME}">
215                                                 <h:outputText value="#{openingTime.openingEndTime.time}">
216                                                         <f:convertDateTime type="time" timeStyle="short" />
217                                                 </h:outputText>
218                                         </p:column>
219                                 </p:dataTable>
220                         </p:fieldset>
221                 </h:form>
222
223                 <h:form id="form-admin-add-branch-opening-time">
224                         <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
225                                 <f:facet name="header">
226                                         <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME_TITLE}" />
227                                 </f:facet>
228
229                                 <h:panelGroup styleClass="para" layout="block">
230                                         <h:outputText value="#{msg.ADMIN_ADD_OPENING_TIME_MINIMUM_DATA}" />
231                                 </h:panelGroup>
232
233                                 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_opening_time.tpl" />
234
235                                 <f:facet name="footer">
236                                         <p:panelGrid columns="2" layout="grid">
237                                                 <p:commandButton
238                                                         styleClass="reset"
239                                                         type="reset"
240                                                         value="#{msg.BUTTON_RESET_FORM}"
241                                                         />
242
243                                                 <p:commandButton
244                                                         styleClass="submit"
245                                                         type="submit"
246                                                         value="#{msg.BUTTON_ADMIN_ADD_BRANCH_OFFICE_OPENING_TIME}"
247                                                         action="#{adminBranchOfficeController.addOpeningTime()}"
248                                                         update=":master:form-list-branch-opening-time:table-list-branch-opening-time"
249                                                         />
250                                         </p:panelGrid>
251                                 </f:facet>
252                         </p:panelGrid>
253                 </h:form>
254         </ui:define>
255 </ui:composition>