]> git.mxchange.org Git - pizzaservice-war.git/blob - web/admin/branch_offices/admin_branch_offices_list.xhtml
Please cherry-pick:
[pizzaservice-war.git] / web / admin / branch_offices / admin_branch_offices_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
10         <ui:define name="admin_title">
11                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
12         </ui:define>
13
14         <ui:define name="content_header">
15                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_BRANCH_OFFICES}" />
16         </ui:define>
17
18         <ui:define name="content">
19                 <widgets:outputMessageBox message="#{msg.ADMIN_BRANCH_OFFICES_LIST_EMPTY}" messageStyleClass="alert-danger" rendered="#{branchOfficeController.allBranchOffices().isEmpty()}" />
20
21                 <h:dataTable id="table_list_branch_offices" var="branchOffice" value="#{branchOfficeController.allBranchOffices()}" styleClass="table-full" headerClass="table-header-column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_BRANCH_OFFICES}" rendered="#{not branchOfficeController.allBranchOffices().isEmpty()}">
22                         <h:column>
23                                 <f:facet name="header">
24                                         <h:outputText value="#{msg.ADMIN_ID_NUMBER}" />
25                                 </f:facet>
26
27                                 <h:link outcome="admin_show_branch_office" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE}" value="#{branchOffice.branchId}">
28                                         <f:param name="branchOfficeId" value="#{branchOffice.branchId}" />
29                                 </h:link>
30                         </h:column>
31
32                         <h:column>
33                                 <f:facet name="header">
34                                         <h:outputText value="#{msg.ADMIN_ASSIGNED_USER_ID}" />
35                                 </f:facet>
36
37                                 <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE}" value="#{branchOffice.branchUserOwner.userId}" rendered="#{not empty branchOffice.branchUserOwner}">
38                                         <f:param name="userId" value="#{branchOffice.branchUserOwner.userId}" />
39                                 </h:link>
40
41                                 <h: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}">
42                                         <f:param name="branchOfficeId" value="#{branchOffice.branchId}" />
43                                 </h:link>
44                         </h:column>
45
46                         <h:column>
47                                 <f:facet name="header">
48                                         <h:outputText value="#{msg.ADMIN_BASIC_COMPANY_DATA_COMPANY_NAME}" />
49                                 </f:facet>
50
51                                 <h:outputLink value="#{branchOffice.branchCompany.companyWebsiteUrl}" target="_blank" title="#{msg.LINK_COMPANY_WEBSITE_URL_TITLE}" rel="external" rendered="#{not empty branchOffice.branchCompany.companyWebsiteUrl}">
52                                         <h:outputText value="#{branchOffice.branchCompany.companyName}" />
53                                 </h:outputLink>
54
55                                 <h:outputText value="#{branchOffice.branchCompany.companyName}" title="#{msg.NO_WEBSITE_URL_ENTERED}" rendered="#{empty branchOffice.branchCompany.companyWebsiteUrl}" />
56                         </h:column>
57
58                         <h:column>
59                                 <f:facet name="header">
60                                         <h:outputText value="#{msg.DATA_EMAIL_ADDRESS}" />
61                                 </f:facet>
62
63                                 <h:outputLink value="mailto:#{branchOffice.branchEmailAddress}" rendered="#{not empty branchOffice.branchEmailAddress}" />
64
65                                 <h:outputText value="#{msg.NO_EMAIL_ADDRESS_ENTERED}" rendered="#{empty branchOffice.branchEmailAddress}" />
66                         </h:column>
67
68                         <h:column>
69                                 <f:facet name="header">
70                                         <h:outputText value="#{msg.DATA_ADDRESS}" />
71                                 </f:facet>
72
73                                 <h:outputText value="#{branchOffice.branchZipCode} #{branchOffice.branchCity}" title="#{branchOffice.branchStreet} #{branchOffice.branchHouseNumber} (#{msg.DATA_STORE} #{branchOffice.branchStore}, #{msg.DATA_SUITE_NUMBER} #{branchOffice.branchSuiteNumber})" />
74                         </h:column>
75
76                         <h:column>
77                                 <f:facet name="header">
78                                         <h:outputText value="#{msg.ADMIN_CONTACT_PERSON}" />
79                                 </f:facet>
80
81                                 <h: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}">
82                                         <f:param name="employeeId" value="#{branchOffice.branchContactEmployee.employeeId}" />
83                                 </h:link>
84
85                                 <h: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}">
86                                         <f:param name="branchOfficeId" value="#{branchOffice.branchId}" />
87                                 </h:link>
88                         </h:column>
89
90                         <h:column>
91                                 <f:facet name="header">
92                                         <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" />
93                                 </f:facet>
94
95                                 <h:outputText id="branchCreated" value="#{branchOffice.branchCreated.time}">
96                                         <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" />
97                                 </h:outputText>
98                         </h:column>
99
100                         <h:column>
101                                 <f:facet name="header">
102                                         <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" />
103                                 </f:facet>
104
105                                 <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" />
106                         </h:column>
107                 </h:dataTable>
108
109                 <h:form id="form_admin_add_branch_office">
110                         <h:panelGroup styleClass="table table-medium" layout="block">
111                                 <div class="table-header">
112                                         <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_TITLE}" />
113                                 </div>
114
115                                 <div class="para">
116                                         <h:outputText value="#{msg.ADMIN_ADD_BRANCH_OFFICE_MINIMUM_DATA}" />
117                                 </div>
118
119                                 <ui:include src="/WEB-INF/templates/admin/branch_offices/admin_form_branch_offices_data.tpl" />
120
121                                 <div class="table-footer">
122                                         <h:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
123                                         <h:commandButton styleClass="submit" type="submit" id="button_add_branch_office" value="#{msg.BUTTON_ADMIN_CONTINUE_BUSINESS_CONTACT_PERSON}" action="#{adminBranchOfficeController.addBranchOffice()}" />
124                                 </div>
125                         </h:panelGroup>
126                 </h:form>
127         </ui:define>
128 </ui:composition>