]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - web/admin/contact/admin_contact_list.xhtml
Please cherry-pick:
[pizzaservice-war.git] / web / admin / contact / admin_contact_list.xhtml
index 84bfe2834dd26d8c2f670684d909e4a5d8fc1e7f..405d97d550739286a7375a388e43e0212f0489bf 100644 (file)
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
-       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
-       xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-       xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:f="http://xmlns.jcp.org/jsf/core"
-       >
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:dataTable id="table_list_contacts" var="contact" value="#{adminContactController.allContacts()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}" rendered="#{adminContactController.hasContacts()}">
-                               <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_LIST_CONTACT_ID}</f:facet>
-
-                                       <h:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_TITLE}" value="#{contact.contactId}">
-                                               <f:param name="contactId" value="#{contact.contactId}" />
-                                       </h:link>
-                               </h:column>
-
-                               <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_LIST_CONTACT_GENDER}</f:facet>
-
-                                       <h:outputText value="#{msg[contact.contactGender.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_LIST_CONTACT_FIRST_NAME}</f:facet>
-
-                                       <h:outputText value="#{contact.contactFirstName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_LIST_CONTACT_FAMILY_NAME}</f:facet>
-
-                                       <h:outputText value="#{contact.contactFamilyName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_CONTACT_USAGE}</f:facet>
-
-                                       <h:outputText value="#{msg[adminHelper.getUserCustomerUsageMessageKey(contact)]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_CONTACT_CREATED}</f:facet>
-
-                                       <h:outputText id="contactCreated" value="#{contact.contactCreated.time}">
-                                               <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
-                                       </h:outputText>
-                               </h:column>
-                       </h:dataTable>
-
-                       <div class="table_medium">
-                               <h:form id="admin_add_contact">
-                                       <div class="table_header">
-                                               #{msg.ADMIN_ADD_CONTACT_TITLE}
-                                       </div>
-
-                                       <div class="para">
-                                               <h:outputText value="#{msg.ADMIN_ADD_CONTACT_MINIMUM_DATA}" />
-                                       </div>
-
-                                       <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl" />
-
-                                       <div class="table_footer">
-                                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_CONTACT}" action="#{adminContactController.addContact()}" />
-                                       </div>
-                               </h:form>
-                       </div>
-               </ui:define>
-       </ui:composition>
-</html>
+<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
+                               xmlns="http://www.w3.org/1999/xhtml"
+                               xmlns:widgets="http://mxchange.org/jsf/core/widgets"
+                               xmlns:links="http://mxchange.org/jsf/core/links"
+                               xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+                               xmlns:h="http://xmlns.jcp.org/jsf/html"
+                               xmlns:f="http://xmlns.jcp.org/jsf/core"
+                               xmlns:p="http://primefaces.org/ui">
+
+       <ui:define name="admin_title">
+               <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT}" />
+       </ui:define>
+
+       <ui:define name="content_header">
+               <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT}" />
+       </ui:define>
+
+       <ui:define name="content">
+               <p:dataTable id="table_list_contacts" var="contact" value="#{contactController.allContacts()}" tableStyleClass="table table-full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}" emptyMessage="#{msg.ADMIN_CONTACT_LIST_EMPTY}">
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_CONTACT_ID}" />
+                               </f:facet>
+
+                               <p:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}" value="#{contact.contactId}">
+                                       <f:param name="contactId" value="#{contact.contactId}" />
+                               </p:link>
+                       </p:column>
+
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
+                               </f:facet>
+
+                               <h:outputText value="#{msg[contact.contactPersonalTitle.messageKey]}" />
+                       </p:column>
+
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+                               </f:facet>
+
+                               <h:outputText value="#{contact.contactFirstName}" />
+                       </p:column>
+
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+                               </f:facet>
+
+                               <h:outputText value="#{contact.contactFamilyName}" />
+                       </p:column>
+
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_CONTACT_USAGE}" />
+                               </f:facet>
+
+                               <h:outputText value="#{msg[beanHelper.getContactUsageMessageKey(contact)]}" />
+                       </p:column>
+
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" />
+                               </f:facet>
+
+                               <h:outputText id="contactCreated" value="#{contact.contactCreated.time}">
+                                       <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" />
+                               </h:outputText>
+                       </p:column>
+
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" />
+                               </f:facet>
+
+                               <links:outputContactAdminMiniLinks contact="#{contact}" />
+                       </p:column>
+               </p:dataTable>
+
+               <h:form id="form_admin_add_contact">
+                       <h:panelGroup styleClass="table table-medium" layout="block">
+                               <div class="table-header">
+                                       <h:outputText value="#{msg.ADMIN_ADD_CONTACT_TITLE}" />
+                               </div>
+
+                               <div class="para">
+                                       <h:outputText value="#{msg.ADMIN_ADD_CONTACT_MINIMUM_DATA}" />
+                               </div>
+
+                               <widgets:outputAdminContactDataFormFields />
+
+                               <f:facet name="footer">
+                                       <p:panelGrid columns="2" layout="grid">
+                                               <p:commandButton
+                                                       styleClass="reset"
+                                                       type="reset"
+                                                       value="#{msg.BUTTON_RESET_FORM}"
+                                                       />
+
+                                               <p:commandButton
+                                                       type="submit"
+                                                       value="#{msg.BUTTON_ADMIN_ADD_CONTACT}"
+                                                       action="#{adminContactController.addContact()}"
+                                                       update="form-list-contacts:contactList"
+                                                       />
+                                       </p:panelGrid>
+                               </f:facet>
+                       </p:panelGrid>
+               </h:form>
+       </ui:define>
+</ui:composition>