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