]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/admin/country/admin_country_list.xhtml
WIP - Please cherry-pick:
[jjobs-war.git] / web / admin / country / admin_country_list.xhtml
index 831eca61335125c548c50b1e43d266aa11ba0c39..2de78e11665d0b1d04235a40462e6c76bd19e440 100644 (file)
@@ -1,9 +1,11 @@
 <?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: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_LIST_COUNTRY}" />
        </ui:define>
 
        <ui:define name="content">
-               <h:dataTable id="table_list_countries" var="country" value="#{countryController.allCountries()}" styleClass="table table-medium" headerClass="table-header-column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_COUNTRIES}" rendered="#{not countryController.allCountries().isEmpty()}">
-                       <h:column>
+               <p:dataTable id="table_list_countries" var="country" value="#{countryController.allCountries()}" tableStyleClass="table table-medium" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_COUNTRIES}" emptyMessage="#{msg.ADMIN_COUNTRY_LIST_EMPTY}">
+                       <p:column>
                                <f:facet name="header">
-                                       <h:outputText value="#{msg.ADMIN_LIST_COUNTRY_DATA_COUNTRY_ID}" />
+                                       <h:outputText value="#{msg.ADMIN_ID_NUMBER}" />
                                </f:facet>
 
-                               <h:link outcome="admin_edit_country" title="#{msg.ADMIN_LINK_EDIT_DELETE_COUNTRY_TITLE}" value="#{country.countryId}">
+                               <p:link outcome="admin_show_country" title="#{msg.ADMIN_LINK_SHOW_COUNTRY_TITLE}" value="#{country.countryId}">
                                        <f:param name="countryId" value="#{country.countryId}" />
-                               </h:link>
-                       </h:column>
+                               </p:link>
+                       </p:column>
 
-                       <h:column>
+                       <p:column>
                                <f:facet name="header">
                                        <h:outputText value="#{msg.ADMIN_LIST_COUNTRY_DATA_COUNTRY_CODE}" />
                                </f:facet>
 
                                <h:outputText value="#{country.countryCode}" />
-                       </h:column>
+                       </p:column>
 
-                       <h:column>
+                       <p:column>
                                <f:facet name="header">
                                        <h:outputText value="#{msg.ADMIN_LIST_COUNTRY_DATA_COUNTRY_EXTERNAL_DIAL_PREFIX}" />
                                </f:facet>
 
                                <h:outputText value="#{country.countryExternalDialPrefix}" />
-                       </h:column>
+                       </p:column>
 
-                       <h:column>
+                       <p:column>
                                <f:facet name="header">
                                        <h:outputText value="#{msg.ADMIN_LIST_COUNTRY_DATA_COUNTRY_NAME}" />
                                </f:facet>
 
                                <h:outputText value="#{msg[country.countryI18nKey]}" />
-                       </h:column>
-               </h:dataTable>
+                       </p:column>
+
+                       <p:column>
+                               <f:facet name="header">
+                                       <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" />
+                               </f:facet>
+
+                               <links:outputCountryAdminMiniLinks country="#{country}" />
+                       </p:column>
+               </p:dataTable>
 
                <h:form id="form_add_country">
                        <h:panelGroup styleClass="table table-medium" layout="block">
@@ -59,8 +69,8 @@
                                <ui:include src="/WEB-INF/templates/admin/country/admin_form_country_data.tpl" />
 
                                <div class="table-footer">
-                                       <h:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                       <h:commandButton styleClass="submit" type="submit" id="add_country" value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}" action="#{adminCountryController.addCountry()}" />
+                                       <p:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                       <p:commandButton styleClass="submit" type="submit" id="button_add_country" value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}" action="#{adminCountryController.addCountry()}" />
                                </div>
                        </h:panelGroup>