<?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}"
+<ui:composition
+ template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:core="http://mxchange.org/jsf/core/widgets"
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="document_admin_title">
+ <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EXPORT_CONTACT}" />
+ </ui:define>
+
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EXPORT_CONTACT}" />
+ </ui:define>
+
+ <ui:define name="content">
+ <h:form rendered="#{not contactListController.allContacts.isEmpty()}">
+ <p:dataTable
+ id="table_export_contacts"
+ var="contact"
+ value="#{contactListController.allContacts}"
+ paginator="true"
+ rows="10"
+ emptyMessage="#{msg.ADMIN_EMPTY_LIST_CONTACT}"
+ summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_CONTACT}"
+ >
+ <p:column
+ exportable="false"
+ >
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_ID}" />
+ </f:facet>
+
+ <p:link
+ outcome="admin_show_contact"
+ value="#{contact.contactId}"
+ title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}"
+ >
+ <f:param name="contactId" value="#{contact.contactId}" />
+ </p:link>
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_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_EXPORT_CONTACT_ACADEMIC_TITLE}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactTitle}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_FIRST_NAME}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactFirstName}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_FAMILY_NAME}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactFamilyName}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_STREET}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactStreet}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_HOUSE_NUMBER}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactHouseNumber}#{contact.contactHouseNumberExtension}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_COUNTRY_CODE}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactCountry.countryCode}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_ZIP_CODE}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactZipCode}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_CITY}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactCity}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_EMAIL_ADDRESS}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactEmailAddress}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_BIRTHDAY}" />
+ </f:facet>
+
+ <h:outputText id="contactBirthday" value="#{contact.contactBirthday}">
+ <f:convertDateTime type="date" dateStyle="medium" />
+ </h:outputText>
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_MOBILE_NUMBER}" />
+ </f:facet>
+
+ <h:outputText value="#{adminContactController.generateMobileNumber(contact.contactMobileNumber)}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_LAND_LINE_NUMBER}" />
+ </f:facet>
+
+ <h:outputText value="#{adminContactController.generatePhoneNumber(contact.contactLandLineNumber)}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_FAX_NUMBER}" />
+ </f:facet>
+
+ <h:outputText value="#{adminContactController.generatePhoneNumber(contact.contactFaxNumber)}" />
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_CREATED}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactEntryCreated}">
+ <f:convertDateTime
+ type="both"
+ timeStyle="short"
+ dateStyle="short"
+ locale="#{localizationController.locale}"
+ />
+ </h:outputText>
+ </p:column>
+
+ <p:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_UPDATED}" />
+ </f:facet>
+
+ <h:outputText value="#{contact.contactEntryUpdated}">
+ <f:convertDateTime
+ type="both"
+ timeStyle="short"
+ dateStyle="short"
+ locale="#{localizationController.locale}"
+ />
+ </h:outputText>
+ </p:column>
+ </p:dataTable>
+
+ <h:panelGroup layout="block">
+ <div class="table-header">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACTS_TITLE}" />
+ </div>
- xmlns:p="http://primefaces.org/ui">
-
- <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
- <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EXPORT_CONTACT}</ui:define>
-
- <ui:define name="content_header">
- #{msg.CONTENT_TITLE_ADMIN_EXPORT_CONTACT}
- </ui:define>
-
- <ui:define name="content">
- <h:form id="form_export_contacts">
- <p:dataTable id="table_export_contacts" var="contact" value="#{contactController.allContacts()}" tableStyleClass="table_big" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_CONTACT}" rendered="#{contactController.hasContacts()}">
- <p:column exportable="false">
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_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>
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_GENDER}" />
- </f:facet>
-
- <h:outputText value="#{msg[contact.contactGender.messageKey]}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_TITLE}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactTitle}" />
- </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_STREET}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactStreet}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactHouseNumber}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_COUNTRY_CODE}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactCountry.countryCode}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactZipCode}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_CITY}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactCity}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactEmailAddress}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
- </f:facet>
-
- <h:outputText id="contactBirthday" value="#{contact.contactBirthday}">
- <f:convertDateTime for="contactBirthday" type="date" dateStyle="medium" />
- </h:outputText>
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_CELLPHONE_NUMBER}" />
- </f:facet>
-
- <h:outputText value="#{adminContactController.generateCellphoneNumber(contact.contactCellphoneNumber)}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_LANDLINE_NUMBER}" />
- </f:facet>
-
- <h:outputText value="#{adminContactController.generatePhoneNumber(contact.contactLandLineNumber)}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_FAX_NUMBER}" />
- </f:facet>
-
- <h:outputText value="#{adminContactController.generatePhoneNumber(contact.contactFaxNumber)}" />
- </p:column>
-
- <p:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_CREATED}" />
- </f:facet>
-
- <h:outputText id="contactCreated" value="#{contact.contactCreated.time}">
- <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" locale="#{localizationController.locale}" />
- </h:outputText>
- </p:column>
- </p:dataTable>
-
- <div class="table_medium">
- <div class="table_header">
- <h:outputText value="#{msg.ADMIN_EXPORT_CONTACTS_TITLE}" />
- </div>
-
- <div class="para">
- <h:outputText value="#{msg.ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING}" />
- </div>
-
- <div class="table_footer">
- <h:commandButton styleClass="submit" type="submit" id="export_contacts" value="#{msg.BUTTON_ADMIN_EXPORT_CONTACTS_CSV}">
- <p:dataExporter type="csv" target="table_export_contacts" fileName="all_contacts" />
- </h:commandButton>
- </div>
+ <div class="para">
+ <h:outputText value="#{msg.ADMIN_EXPORT_CONTACTS_TIMEOUT_WARNING}" />
</div>
- </h:form>
- </ui:define>
- </ui:composition>
-</html>
+
+ <p:panelGrid columns="2" layout="grid">
+ <p:commandButton
+ ajax="false"
+ type="submit"
+ value="#{msg.BUTTON_ADMIN_EXPORT_CONTACTS_XLS}"
+ >
+
+ <p:dataExporter
+ type="xls"
+ target="table_export_contacts"
+ fileName="all_contacts"
+ />
+ </p:commandButton>
+ </p:panelGrid>
+ </h:panelGroup>
+ </h:form>
+ </ui:define>
+</ui:composition>