-<!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}"
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+ template="/WEB-INF/templates/admin/admin_base.tpl"
xmlns="http://www.w3.org/1999/xhtml"
+ 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:composition template="/WEB-INF/templates/admin/admin_base.tpl">
- <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_LIST}</ui:define>
+ <ui:define name="document_admin_title">
+ <h:outputText value="#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_LIST}" />
+ </ui:define>
- <ui:define name="content_header">
- #{msg.CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_LIST}
- </ui:define>
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_LIST}" />
+ </ui:define>
- <ui:define name="content">
- <h:dataTable id="table_list_mobile" var="mobile" value="#{mobileProviderController.allMobileProvider()}" styleClass="table_medium" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" rendered="#{mobileProviderController.hasMobileProvider()}">
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_ID}" />
- </f:facet>
+ <ui:define name="content">
+ <h:form id="form-list-mobile-providers">
+ <p:dataTable
+ id="mobileProviderList"
+ var="mobileProvider"
+ value="#{mobileProviderListController.allMobileProviders}"
+ paginator="true"
+ paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
+ filteredValue="#{mobileProviderListController.filteredMobileProviders}"
+ rows="10"
+ rowKey="#{mobileProvider.providerId}"
+ reflow="true"
+ resizableColumns="true"
+ rowsPerPageTemplate="5,10,20,50,100"
+ sortMode="multiple"
+ summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}"
+ emptyMessage="#{msg.ADMIN_EMPTY_LIST_MOBILE_PROVIDERS}"
+ widgetVar="mobileProviderList"
+ selectionMode="single"
+ selection="#{mobileProviderListController.selectedMobileProvider}"
+ skipChildren="true"
+ >
- <h:link outcome="admin_edit_mobile_provider" title="#{msg.ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE}" value="#{mobile.providerId}">
- <f:param name="providerId" value="#{mobile.providerId}" />
- </h:link>
- </h:column>
+ <f:facet name="header">
+ <p:panelGrid
+ columns="3"
+ layout="grid"
+ columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2"
+ >
+ <p:spacer />
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" />
- </f:facet>
+ <p:panelGrid
+ columns="2"
+ columnClasses="ui-grid-4,ui-grid-8"
+ layout="grid"
+ styleClass="ui-noborder"
+ >
+ <p:outputLabel
+ for="globalFilter"
+ value="#{msg.SEARCH_ALL_FIELDS}"
+ style="float: right"
+ />
- <h:outputText value="#{mobile.providerName}" />
- </h:column>
+ <p:inputText
+ id="globalFilter"
+ onkeyup="PF('mobileProviderList').filter()"
+ placeholder="#{msg.ENTER_KEYWORD}"
+ />
+ </p:panelGrid>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" />
- </f:facet>
+ <p:outputPanel>
+ <p:spacer height="4" />
- <h:outputText value="#{mobile.providerDialPrefix}" />
- </h:column>
+ <p:commandButton
+ id="toggler"
+ type="button"
+ value="#{msg.SELECT_SHOWN_COLUMNS}"
+ styleClass="column-selector"
+ />
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" />
- </f:facet>
+ <p:columnToggler datasource="mobileProviderList" trigger="toggler" />
+ </p:outputPanel>
+ </p:panelGrid>
+ </f:facet>
+
+ <p:ajax
+ event="rowSelect"
+ update="form-list-mobile-providers:mobile-provider-details"
+ oncomplete="PF('mobileProviderDialog').show()"
+ />
- <h:outputText value="#{msg[mobile.providerCountry.countryI18nKey]}" />
- </h:column>
+ <p:column
+ headerText="#{msg.ID_HEADER}"
+ sortBy="#{mobileProvider.providerId}"
+ filterBy="#{mobileProvider.providerId}"
+ >
+ <p:link
+ outcome="admin_show_mobile_provider"
+ value="#{mobileProvider.providerId}"
+ title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}"
+ >
+ <f:param name="providerId" value="#{mobileProvider.providerId}" />
+ </p:link>
+ </p:column>
- <h:column>
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_ENTRY_CREATED}" />
+ <p:column
+ headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}"
+ sortBy="#{mobileProvider.providerName}"
+ filterBy="#{mobileProvider.providerName}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{mobileProvider.providerName}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}"
+ sortBy="#{mobileProvider.providerDialPrefix}"
+ filterBy="#{mobileProvider.providerDialPrefix}"
+ filterMatchMode="contains"
+ >
+ <h:outputText value="#{mobileProvider.providerDialPrefix}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}"
+ sortBy="#{mobileProvider.providerCountry.countryPhoneCode}"
+ filterBy="#{mobileProvider.providerCountry}"
+ filterMatchMode="in"
+ >
+ <f:facet name="filter">
+ <p:selectCheckboxMenu
+ filter="true"
+ filterMatchMode="contains"
+ label="#{msg.LABEL_COUNTRIES}"
+ onchange="PF('mobileProviderList').filter()"
+ updateLabel="true"
+ title="#{msg.FILTER_BY_MULTIPLE_COUNTRY_TITLE}"
+ >
+ <f:converter converterId="CountryConverter" />
+ <f:selectItems
+ value="#{countryListController.allCountries}"
+ var="country"
+ itemValue="#{country}"
+ itemLabel="#{msg[country.countryI18nKey]}"
+ />
+ </p:selectCheckboxMenu>
</f:facet>
- <h:outputText id="providerEntryCreated" value="#{mobile.providerEntryCreated.time}" title="#{msg.ADMIN_MOBILE_PROVIDER_ENTRY_CREATED_TITLE}">
- <f:convertDateTime for="providerEntryCreated" type="both" timeStyle="short" dateStyle="short" />
+ <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" />
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ENTRY_CREATED_HEADER}"
+ sortBy="#{mobileProvider.providerEntryCreated}"
+ >
+ <h:outputText value="#{mobileProvider.providerEntryCreated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ENTRY_UPDATED_HEADER}"
+ sortBy="#{mobileProvider.providerEntryUpdated}"
+ >
+ <h:outputText value="#{mobileProvider.providerEntryUpdated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
- </h:column>
- </h:dataTable>
-
- <h:form id="form_add_mobile_provider">
- <h:panelGroup styleClass="table_medium" layout="block">
- <div class="table_header">
- <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}" />
- </div>
-
- <ui:include src="/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl" />
-
- <div class="table_footer">
- <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton styleClass="submit" type="submit" id="add_mobile_provider" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" />
- </div>
- </h:panelGroup>
-
- <div class="para notice">
- <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_NOTICES}" />
- <ul>
- <li><h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_PATTERN}" /></li>
- </ul>
+ </p:column>
+
+ <p:column
+ headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
+ sortable="false"
+ >
+ <p:menuButton value="#{msg.OPTIONS}">
+ <p:menuitem
+ outcome="admin_show_mobile_provider"
+ value="#{msg.ADMIN_LINK_SHOW_SHORT}"
+ title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}"
+ >
+ <f:param name="providerId" value="#{mobileProvider.providerId}" />
+ </p:menuitem>
+
+ <p:menuitem
+ outcome="admin_edit_mobile_provider"
+ value="#{msg.ADMIN_LINK_EDIT_SHORT}"
+ title="#{msg.ADMIN_LINK_EDIT_MOBILE_PROVIDER_TITLE}"
+ >
+ <f:param name="providerId" value="#{mobileProvider.providerId}" />
+ </p:menuitem>
+
+ <p:menuitem outcome="admin_delete_mobile_provider">
+ <h:outputText
+ styleClass="link-danger"
+ value="#{msg.ADMIN_LINK_DELETE_SHORT}"
+ title="#{msg.ADMIN_LINK_DELETE_MOBILE_PROVIDER_TITLE}"
+ />
+ <f:param name="providerId" value="#{mobileProvider.providerId}" />
+ </p:menuitem>
+ </p:menuButton>
+ </p:column>
+ </p:dataTable>
+
+ <p:dialog
+ dynamic="true"
+ modal="true"
+ resizable="false"
+ header="#{msg.ADMIN_SINGLE_MOBILE_PROVIDER_DETAILS_HEADER}"
+ hideEffect="fade"
+ showEffect="fade"
+ widgetVar="mobileProviderDialog"
+ position="top"
+ responsive="true"
+ closeOnEscape="true"
+ >
+ <p:outputPanel id="mobile-provider-details">
+ <p:panelGrid columns="2" rendered="#{not empty mobileProviderListController.selectedMobileProvider}">
+ <f:facet name="header">
+ <h:outputFormat value="#{msg.ADMIN_MOBILE_PROVIDER_DETAILS_HEADER}">
+ <f:param value="#{mobileProviderListController.selectedMobileProvider.providerName}" />
+ <f:param value="#{mobileProviderListController.selectedMobileProvider.providerId}" />
+ </h:outputFormat>
+ </f:facet>
+
+ <p:outputLabel value="#{msg.ID_HEADER}" title="#{msg.MOBILE_PROVIDER_ID_NUMBER_TITLE}" />
+ <h:outputText value="#{mobileProviderListController.selectedMobileProvider.providerId}" />
+ </p:panelGrid>
+ </p:outputPanel>
+ </p:dialog>
+ </h:form>
+
+ <h:form>
+ <h:panelGroup layout="block">
+ <div class="table-header">
+ <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}" />
</div>
- </h:form>
- </ui:define>
- </ui:composition>
-</html>
+
+ <ui:include src="/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl" />
+
+ <p:panelGrid columns="2" layout="grid">
+ <p:commandButton
+ type="reset"
+ value="#{msg.BUTTON_RESET_FORM}"
+ />
+
+ <p:commandButton
+ type="submit"
+ value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}"
+ action="#{adminMobileProviderController.addMobileProvider()}"
+ update="form-list-mobile-providers:mobileProviderList"
+ />
+ </p:panelGrid>
+ </h:panelGroup>
+
+ <h:panelGroup styleClass="para notice" layout="block">
+ <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_NOTICES}" />
+ <ul>
+ <li><h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_PATTERN}" /></li>
+ </ul>
+ </h:panelGroup>
+ </h:form>
+ </ui:define>
+</ui:composition>