- <h:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}" value="#{contact.contactId}">
- <f:param name="contactId" value="#{contact.contactId}" />
- </h:link>
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
- </f:facet>
-
- <h:outputText value="#{msg[contact.contactPersonalTitle.messageKey]}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactFirstName}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
- </f:facet>
-
- <h:outputText value="#{contact.contactFamilyName}" />
- </h:column>
+ <p:ajax
+ event="rowSelect"
+ update=":master:form-list-contacts:contact-details"
+ oncomplete="PF('contactDialog').show()"
+ />
+
+ <p:column
+ headerText="#{msg.ID_HEADER}"
+ sortBy="#{contact.contactId}"
+ filterable="false"
+ >
+ <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
+ headerText="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}"
+ sortBy="#{contact.contactPersonalTitle}"
+ filterBy="#{contact.contactPersonalTitle}"
+ filterMatchMode="exact"
+ >
+ <f:facet name="filter">
+ <p:selectOneMenu onchange="PF('contactList').filter()">
+ <f:converter converterId="PersonalTitleConverter" />
+ <f:selectItem itemLabel="#{msg.CHOICE_ALL}" itemValue="#{null}" />
+ <f:selectItems
+ value="#{dataController.personalTitles}"
+ var="personalTitle"
+ itemValue="#{personalTitle}"
+ itemLabel="#{msg[personalTitle.messageKey]}"
+ />
+ </p:selectOneMenu>
+ </f:facet>
+ <h:outputText value="#{msg[contact.contactPersonalTitle.messageKey]}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_CONTACT_FIRST_NAME}"
+ sortBy="#{contact.contactFirstName}"
+ filterBy="#{contact.contactFirstName}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{contact.contactFirstName}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_CONTACT_FAMILY_NAME}"
+ sortBy="#{contact.contactFamilyName}"
+ filterBy="#{contact.contactFamilyName}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{contact.contactFamilyName}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ENTRY_CREATED_HEADER}"
+ sortBy="#{contact.contactCreated}"
+ filterBy="#{contact.contactCreated}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{contact.contactCreated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ENTRY_UPDATED_HEADER}"
+ sortBy="#{contact.contactUpdated}"
+ filterBy="#{contact.contactUpdated}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{contact.contactUpdated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_CONTACT_USAGE}"
+ sortable="false"
+ filterable="false"
+ >
+ <h:outputText value="#{msg[beanHelper.getContactUsageMessageKey(contact)]}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
+ sortable="false"
+ filterable="false"
+ >
+ <links:outputContactAdminDropdownMenu contact="#{contact}" />
+ </p:column>
+ </p:dataTable>
+
+ <p:dialog
+ dynamic="true"
+ modal="true"
+ resizable="false"
+ header="#{msg.ADMIN_SINGLE_CONTACT_DETAILS_HEADER}"
+ hideEffect="fade"
+ showEffect="fade"
+ widgetVar="contactDialog"
+ position="top"
+ responsive="true"
+ closeOnEscape="true"
+ >
+ <p:outputPanel id="contact-details">
+ <p:panelGrid columns="2" rendered="#{not empty contactListController.selectedContact}">
+ <f:facet name="header">
+ <h:outputFormat value="#{msg.ADMIN_CONTACT_DETAILS_HEADER}">
+ <f:param value="#{msg[contactListController.selectedContact.contactPersonalTitle.messageKey]}" />
+ <f:param value="#{contactListController.selectedContact.contactFirstName}" />
+ <f:param value="#{contactListController.selectedContact.contactFamilyName}" />
+ <f:param value="#{contactListController.selectedContact.contactId}" />
+ </h:outputFormat>
+ </f:facet>
+
+ <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.CONTACT_ID_NUMBER_TITLE}" />
+ <h:outputText value="#{contactListController.selectedContact.contactId}" />
+ </p:panelGrid>
+ </p:outputPanel>
+ </p:dialog>
+ </h:form>