]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/contact/admin_contact_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / contact / admin_contact_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_CONTACT}" />
13         </ui:define>
14
15         <ui:define name="content_header">
16                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT}" />
17         </ui:define>
18
19         <ui:define name="content">
20                 <h:form id="form-list-contacts">
21                         <p:dataTable
22                                 id="table-list-contacts"
23                                 var="contact"
24                                 value="#{contactController.allContacts()}"
25                                 tableStyleClass="table table-full"
26                                 paginator="true"
27                                 rows="10"
28                                 summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}"
29                                 emptyMessage="#{msg.ADMIN_CONTACT_LIST_EMPTY}"
30                                 widgetVar="contactList"
31                                 >
32                                 <p:column>
33                                         <f:facet name="header">
34                                                 <h:outputText value="#{msg.ADMIN_CONTACT_ID}" />
35                                         </f:facet>
36
37                                         <p:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}" value="#{contact.contactId}">
38                                                 <f:param name="contactId" value="#{contact.contactId}" />
39                                         </p:link>
40                                 </p:column>
41
42                                 <p:column>
43                                         <f:facet name="header">
44                                                 <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
45                                         </f:facet>
46
47                                         <h:outputText value="#{msg[contact.contactPersonalTitle.messageKey]}" />
48                                 </p:column>
49
50                                 <p:column>
51                                         <f:facet name="header">
52                                                 <h:outputText value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
53                                         </f:facet>
54
55                                         <h:outputText value="#{contact.contactFirstName}" />
56                                 </p:column>
57
58                                 <p:column>
59                                         <f:facet name="header">
60                                                 <h:outputText value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
61                                         </f:facet>
62
63                                         <h:outputText value="#{contact.contactFamilyName}" />
64                                 </p:column>
65
66                                 <p:column>
67                                         <f:facet name="header">
68                                                 <h:outputText value="#{msg.ADMIN_CONTACT_USAGE}" />
69                                         </f:facet>
70
71                                         <h:outputText value="#{msg[beanHelper.getContactUsageMessageKey(contact)]}" />
72                                 </p:column>
73
74                                 <p:column>
75                                         <f:facet name="header">
76                                                 <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" />
77                                         </f:facet>
78
79                                         <h:outputText id="contactCreated" value="#{contact.contactCreated.time}">
80                                                 <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
81                                         </h:outputText>
82                                 </p:column>
83
84                                 <p:column>
85                                         <f:facet name="header">
86                                                 <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" />
87                                         </f:facet>
88
89                                         <links:outputContactAdminMiniLinks contact="#{contact}" />
90                                 </p:column>
91                         </p:dataTable>
92                 </h:form>
93
94                 <h:form id="form-admin-add-contact">
95                         <p:panelGrid layout="grid" columns="1" styleClass="table table-full">
96                                 <f:facet name="header">
97                                         <h:outputText value="#{msg.ADMIN_ADD_CONTACT_TITLE}" />
98                                 </f:facet>
99
100                                 <h:outputText value="#{msg.ADMIN_ADD_CONTACT_MINIMUM_DATA}" />
101
102                                 <widgets:outputAdminContactDataFormFields />
103
104                                 <f:facet name="footer">
105                                         <p:commandButton
106                                                 styleClass="reset divider-right"
107                                                 type="reset"
108                                                 value="#{msg.BUTTON_RESET_FORM}"
109                                                 />
110                                         <p:commandButton
111                                                 styleClass="submit"
112                                                 type="submit"
113                                                 value="#{msg.BUTTON_ADMIN_ADD_CONTACT}"
114                                                 action="#{adminContactController.addContact()}"
115                                                 update=":master:form-list-contacts:table-list-contacts"
116                                                 />
117                                 </f:facet>
118                         </p:panelGrid>
119                 </h:form>
120         </ui:define>
121 </ui:composition>