]> git.mxchange.org Git - pizzaservice-war.git/blob - web/admin/customer/admin_customer_list.xhtml
Continued with contacts:
[pizzaservice-war.git] / web / admin / customer / admin_customer_list.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html
4         lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
5         xmlns="http://www.w3.org/1999/xhtml"
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
11         <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
12                 <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_CUSTOMER}</ui:define>
13
14                 <ui:define name="content_header">
15                         #{msg.CONTENT_TITLE_ADMIN_LIST_CUSTOMER}
16                 </ui:define>
17
18                 <ui:define name="content">
19                         <h:dataTable id="table_list_customers" var="customer" value="#{adminCustomerController.allCustomers()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CUSTOMER}" rendered="#{adminCustomerController.hasCustomers()}">
20                                 <h:column>
21                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_ID}</f:facet>
22
23                                         <h:link outcome="admin_show_customer" title="#{msg.ADMIN_LINK_SHOW_CUSTOMER_TITLE}" value="#{customer.customerId}">
24                                                 <f:param name="customerId" value="#{customer.customerId}" />
25                                         </h:link>
26                                 </h:column>
27
28                                 <h:column>
29                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_NUMBER}</f:facet>
30
31                                         <h:outputText value="#{customer.customerNumber}" />
32                                 </h:column>
33
34                                 <h:column>
35                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_GENDER}</f:facet>
36
37                                         <h:outputText value="#{msg[customer.customerContact.contactGender.messageKey]}" />
38                                 </h:column>
39
40                                 <h:column>
41                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_FIRST_NAME}</f:facet>
42
43                                         <h:outputText value="#{customer.customerContact.contactFirstName}" />
44                                 </h:column>
45
46                                 <h:column>
47                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_FAMILY_NAME}</f:facet>
48
49                                         <h:outputText value="#{customer.customerContact.contactFamilyName}" />
50                                 </h:column>
51
52                                 <h:column>
53                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_ACCOUNT_STATUS}</f:facet>
54
55                                         <h:outputText styleClass="#{customer.customerAccountStatus.styleClass}" value="#{msg[customer.customerAccountStatus.messageKey]}" />
56                                 </h:column>
57
58                                 <h:column>
59                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_PROFILE_MODE}</f:facet>
60
61                                         <h:outputText value="#{msg[customer.customerProfileMode.messageKey]}" />
62                                 </h:column>
63
64                                 <h:column>
65                                         <f:facet name="header">#{msg.ADMIN_LIST_CUSTOMER_CREATED}</f:facet>
66
67                                         <h:outputText id="customerCreated" value="#{customer.customerCreated.time}">
68                                                 <f:convertDateTime for="customerCreated" type="both" timeStyle="short" dateStyle="short" />
69                                         </h:outputText>
70                                 </h:column>
71                         </h:dataTable>
72
73                         <div class="table_medium">
74                                 <h:form id="admin_add_customer">
75                                         <div class="table_header">
76                                                 #{msg.ADMIN_ADD_CUSTOMER_TITLE}
77                                         </div>
78
79                                         <div class="para">
80                                                 <fieldset id="customer_contact">
81                                                         <legend title="#{msg.ADMIN_SELECT_CUSTOMER_CONTACT_LEGEND_TITLE}">#{msg.ADMIN_SELECT_CUSTOMER_CONTACT_LEGEND}</legend>
82
83                                                         <div class="table_row">
84                                                                 <div class="table_left_medium">
85                                                                         <h:outputLabel for="customerContact" value="#{msg.ADMIN_SELECT_CUSTOMER_CONTACT}" />
86                                                                 </div>
87
88                                                                 <div class="table_right_medium">
89                                                                         <h:selectOneMenu class="select" id="customerContact" value="#{adminHelper.contact}" converter="ContactConverter">
90                                                                                 <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
91                                                                                 <f:selectItems value="#{customerController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact}" />
92                                                                         </h:selectOneMenu>
93                                                                 </div>
94
95                                                                 <div class="clear"></div>
96                                                         </div>
97                                                 </fieldset>
98                                         </div>
99
100                                         <div class="para">
101                                                 <h:outputText value="#{msg.ADMIN_ADD_OR_ENTER_CONTACT_DATA}" />
102                                         </div>
103
104                                         <ui:include src="/WEB-INF/templates/admin/customer/admin_form_customer_personal_data.tpl" />
105
106                                         <div class="table_footer">
107                                                 <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
108                                                 <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_CUSTOMER}" action="#{adminCustomerController.addCustomer()}" />
109                                         </div>
110                                 </h:form>
111                         </div>
112                 </ui:define>
113         </ui:composition>
114 </html>