]> 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_BRANCH_OFFICES_LIST_EMPTY}"
36                                 widgetVar="branchOfficeList"
37                                 >
38
39                                 <f:facet name="header">
40                                         <p:row>
41                                                 <p:column>
42                                                         <h:outputText value="#{msg.ADMIN_LIST_BRANCH_OFFICES_HEADER}" />
43                                                 </p:column>
44                                                 <p:column>
45                                                         <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
46                                                         <p:columnToggler datasource="table-list-branch-offices" trigger="toggler" />
47                                                 </p:column>
48                                         </p:row>
49                                 </f:facet>
50
51                                 <p:column headerText="#{msg.ADMIN_ID_NUMBER}" sortBy="#{branchOffice.branchId}" filterBy="#{branchOffice.branchId}">
52                                         <p:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
53                                                 <f:param name="branchId" value="#{branchOffice.branchId}" />
54                                         </p:link>
55                                 </p:column>
56
57                                 <p:column headerText="#{msg.ADMIN_ASSIGNED_USER}" sortBy="#{branchOffice.branchUserOwner.userName}" filterBy="#{branchOffice.branchUserOwner}" filterMatchMode="in">
58                                         <f:facet name="filter">
59                                                 <p:selectCheckboxMenu
60                                                         filter="true"
61                                                         filterMatchMode="contains"
62                                                         label="#{msg.LABEL_USERS}"
63                                                         onchange="PF('branchOfficeList').filter()"
64                                                         updateLabel="true"
65                                                         title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
66                                                         >
67                                                         <f:converter converterId="UserConverter" />
68                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
69                                                         <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
70                                                 </p:selectCheckboxMenu>
71                                         </f:facet>
72
73                                         <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}">
74                                                 <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
75                                         </p:link>
76
77                                         <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}">
78                                                 <f:param name="branchId" value="#{branchOffice.branchId}" />
79                                         </p:link>
80                                 </p:column>
81
82                                 <p:column headerText="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" sortBy="#{branchOffice.branchCompany.companyName}" filterBy="#{branchOffice.branchCompany}" filterMatchMode="in">
83                                         <f:facet name="filter">
84                                                 <p:selectCheckboxMenu filter="true" filterMatchMode="contains" label="#{msg.LABEL_COMPANIES}" onchange="PF('branchOfficeTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COMPANIES_TITLE}">
85                                                         <f:converter converterId="BasicCompanyDataConverter" />
86                                                         <f:selectItems value="#{basicCompanyDataController.allCompanyBasicData()}" var="basicData" itemValue="#{basicData}" itemLabel="#{basicData.companyName}" />
87                                                 </p:selectCheckboxMenu>
88                                         </f:facet>
89
90                                         <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
91                                                 <h:outputText value="#{branchOffice.branchCompany.companyName}" />
92                                         </h:outputLink>
93
94                                         <h:outputText value="#{branchOffice.branchCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
95                                 </p:column>
96
97                                 <p:column headerText="#{msg.DATA_EMAIL_ADDRESS}" sortBy="#{branchOffice.branchEmailAddress}" filterBy="#{branchOffice.branchEmailAddress}" filterMatchMode="contains">
98                                         <h:outputLink value="mailto:#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
99
100                                         <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
101                                 </p:column>
102
103                                 <p:column headerText="#{msg.DATA_ADDRESS}" sortBy="#{branchOffice.branchCity}" filterBy="#{branchOffice.branchCity}" filterMatchMode="contains">
104                                         <h:outputText value="#{branchOffice.branchZipCode} #{branchOffice.branchCity}" title="#{branchOffice.branchStreet} #{branchOffice.branchHouseNumber} (#{msg.DATA_STORE} #{branchOffice.branchStore}, #{msg.DATA_SUITE_NUMBER} #{branchOffice.branchSuiteNumber})" />
105                                 </p:column>
106
107                                 <p:column headerText="#{msg.ADMIN_CONTACT_PERSON}" sortBy="#{branchOffice.branchContactEmployee.employeePersonalData.contactFamilyName}" filterBy="#{branchOffice.branchContactEmployee}" filterMatchMode="in">
108                                         <f:facet name="filter">
109                                                 <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}">
110                                                         <f:converter converterId="CompanyEmployeeConverter" />
111                                                         <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
112                                                         <f:selectItems value="#{companyEmployeeController.allCompanyEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{employee.employeePersonalData.contactFirstName} #{employee.employeePersonalData.contactFamilyName}" />
113                                                 </p:selectCheckboxMenu>
114                                         </f:facet>
115
116                                         <p:link outcome="admin_show_business_employee" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE}" value="#{branchOffice.branchContactEmployee.employeeId}" rendered="#{not empty branchOffice.branchContactEmployee}">
117                                                 <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
118                                         </p:link>
119
120                                         <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}">
121                                                 <f:param name="branchId" value="#{branchOffice.branchId}" />
122                                         </p:link>
123                                 </p:column>
124
125                                 <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{branchOffice.branchCreated}">
126                                         <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
127                                                 <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
128                                         </h:outputText>
129                                 </p:column>
130
131                                 <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false">
132                                         <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
133                                 </p:column>
134                         </p:dataTable>
135                 </h:form>
136
137                 <h:form id="form-admin-add-branch-office">
138                         <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
139                                 <h:panelGroup styleClass="table-header" layout="block">
140                                         <h4>
141                                                 <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
142                                         </h4>
143                                 </h:panelGroup>
144
145                                 <h:panelGroup styleClass="para" layout="block">
146                                         <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_MINIMUM_DATA}" />
147                                 </h:panelGroup>
148
149                                 <ui:include src="/WEB-INF/templates/admin/branch_office/admin_form_branch_office_data.tpl" />
150
151                                 <p:panelGrid columns="2" styleClass="table-footer" layout="grid">
152                                         <p:commandButton
153                                                 styleClass="reset divider-right"
154                                                 type="reset"
155                                                 value="#{msg.BUTTON_RESET_FORM}"
156                                                 />
157
158                                         <p:commandButton
159                                                 styleClass="submit"
160                                                 type="submit"
161                                                 value="#{msg.BUTTON_ADMIN_ADD_BASIC_COMPANY_DATA}"
162                                                 action="#{adminBranchOfficeController.addBranchOffice()}"
163                                                 update=":master:form-list-branch-offices:table-list-branch-offices"
164                                                 />
165                                 </p:panelGrid>
166                         </p:panelGrid>
167                 </h:form>
168         </ui:define>
169 </ui:composition>