]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/admin/mobile_provider/admin_mobile_provider_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / mobile_provider / admin_mobile_provider_list.xhtml
index fdd1d473bed5e0fc4567d73cea93a4ed0148bbb4..a45e6972ea350fecc6efb854a69220e8136fbfb6 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_MOBILE_PROVIDER_LIST}</ui:define>
-
-               <ui:define name="content_header">
-                       #{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>
-
-                                       <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>
-
-                               <h:column>
-                                       <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" />
-                                       </f:facet>
-
-                                       <h:outputText value="#{mobile.providerName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" />
+<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:define name="admin_title">
+               <h:outputText value="#{msg.PAGE_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: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}">
+
+                               <f:facet name="header">
+                                       <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>
+
+                               <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="#{mobile.providerDialPrefix}" />
-                               </h:column>
+                                       <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" />
+                               </p:column>
 
-                               <h:column>
-                                       <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" />
-                                       </f:facet>
-
-                                       <h:outputText value="#{msg[mobile.providerCountry.countryI18nkey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <f:facet name="header">
-                                               <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_ENTRY_CREATED}" />
-                                       </f:facet>
-
-                                       <h:outputText id="providerEntryCreated" value="#{mobile.providerEntryCreated.time}" title="#{msg.ADMIN_MOBILE_PROVIDER_ENTRY_CREATED_TITLE}">
+                               <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>
-                               </h:column>
-                       </h:dataTable>
-
-                       <h:form id="add_mobile_provider_form">
-                               <div class="table_medium">
-                                       <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" 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>
+                               </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">
+                               <div class="table-header">
+                                       <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}" />
                                </div>
 
-                               <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>
+                               <ui:include src="/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl" />
+
+                               <div class="table-footer">
+                                       <p:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                       <p:commandButton styleClass="submit" type="submit" id="button_add_mobile_provider" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" />
                                </div>
-                       </h:form>
-               </ui:define>
-       </ui:composition>
-</html>
+                       </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>