</ui:define>
<ui:define name="content">
- <p:dataTable id="table_list_mobile" var="mobileProvider" value="#{mobileProviderController.allMobileProviders()}" tableStyleClass="table table-medium" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" emptyMessage="#{msg.ADMIN_MOBILE_PROVIDER_LIST_EMPTY}">
- <p:column sortBy="#{mobileProvider.providerId}">
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_ID_NUMBER}" />
- </f:facet>
-
- <p:link outcome="admin_show_mobile_provider" title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}" value="#{mobileProvider.providerId}">
- <f:param name="providerId" value="#{mobileProvider.providerId}" />
- </p:link>
- </p:column>
-
- <p:column sortBy="#{mobileProvider.providerName}" priority="3">
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" />
- </f:facet>
-
- <h:outputText value="#{mobileProvider.providerName}" />
- </p:column>
-
- <p:column sortBy="#{mobileProvider.providerDialPrefix}" priority="2">
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" />
- </f:facet>
+ <h:form id="form-list-mobile-provider">
+ <p:dataTable
+ id="table-list-mobile-provider"
+ var="mobileProvider"
+ value="#{mobileProviderController.allMobileProviders()}"
+ widgetVar="mobileProviderTable"
+ filteredValue="#{mobileProviderController.filteredMobileProviders}"
+ tableStyleClass="table table-medium"
+ rows="10"
+ paginator="true"
+ paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
+ reflow="true"
+ resizableColumns="true"
+ rowsPerPageTemplate="5,10,20,50,100"
+ sortMode="multiple"
+ summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}"
+ emptyMessage="#{msg.ADMIN_MOBILE_PROVIDER_LIST_EMPTY}">
- <h:outputText value="#{mobileProvider.providerDialPrefix}" />
- </p:column>
-
- <p:column sortBy="#{mobileProvider.providerCountry.countryPhoneCode}" priority="4">
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" />
- </f:facet>
-
- <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" />
- </p:column>
-
- <p:column sortBy="#{mobileProvider.providerEntryCreated}" priority="5">
<f:facet name="header">
- <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" />
+ <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDERS_HEADER}" />
+ <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
+ <p:columnToggler datasource="table-list-mobile-provider" trigger="toggler" />
</f:facet>
- <h:outputText id="providerEntryCreated" value="#{mobileProvider.providerEntryCreated.time}" title="#{msg.ADMIN_MOBILE_PROVIDER_ENTRY_CREATED_TITLE}">
- <f:convertDateTime for="providerEntryCreated" type="both" timeStyle="short" dateStyle="short" />
- </h:outputText>
- </p:column>
-
- <p:column sortable="false" priority="6">
- <f:facet name="header">
- <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" />
- </f:facet>
-
- <links:outputMobileProviderAdminMiniLinks mobileProvider="#{mobileProvider}" />
- </p:column>
- </p:dataTable>
+ <p:column filterBy="#{mobileProvider.providerId}" sortBy="#{mobileProvider.providerId}" headerText="#{msg.ADMIN_ID_NUMBER}">
+ <p:link outcome="admin_show_mobile_provider" title="#{msg.ADMIN_LINK_SHOW_MOBILE_PROVIDER_TITLE}" value="#{mobileProvider.providerId}">
+ <f:param name="providerId" value="#{mobileProvider.providerId}" />
+ </p:link>
+ </p:column>
+
+ <p:column filterBy="#{mobileProvider.providerName}" sortBy="#{mobileProvider.providerName}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" filterMatchMode="contains">
+ <h:outputText value="#{mobileProvider.providerName}" />
+ </p:column>
+
+ <p:column filterBy="#{mobileProvider.providerDialPrefix}" sortBy="#{mobileProvider.providerDialPrefix}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" filterMatchMode="contains">
+ <h:outputText value="#{mobileProvider.providerDialPrefix}" />
+ </p:column>
+
+ <p:column filterBy="#{mobileProvider.providerCountry}" sortBy="#{mobileProvider.providerCountry.countryPhoneCode}" headerText="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" filterMatchMode="in">
+ <f:facet name="filter">
+ <p:selectCheckboxMenu filter="true" label="#{msg.COUNTRIES}" onchange="PF('mobileProviderTable').filter()" updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_COUNTRY_TITLE}">
+ <f:converter converterId="CountryConverter" />
+ <f:selectItems value="#{countryController.allCountries()}" var="country" itemValue="#{country}" itemLabel="#{msg[country.countryI18nKey]}" />
+ </p:selectCheckboxMenu>
+ </f:facet>
+
+ <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" />
+ </p:column>
+
+ <p:column sortBy="#{mobileProvider.providerEntryCreated}" headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}">
+ <h:outputText id="providerEntryCreated" value="#{mobileProvider.providerEntryCreated.time}">
+ <f:convertDateTime for="providerEntryCreated" type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+ </p:column>
+
+ <p:column sortable="false" headerText="#{msg.ADMIN_ACTION_LINKS}">
+ <links:outputMobileProviderAdminMiniLinks mobileProvider="#{mobileProvider}" />
+ </p:column>
+ </p:dataTable>
+ </h:form>
<h:form id="form_add_mobile_provider">
<h:panelGroup styleClass="table table-medium" layout="block">