← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5497: added page indicator to generated html

 

------------------------------------------------------------
revno: 5497
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-12-20 09:57:21 +0100
message:
  added page indicator to generated html
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl	2011-12-15 19:34:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/categoryCombo.xsl	2011-12-20 08:57:21 +0000
@@ -34,7 +34,7 @@
     </table>
   </xsl:template>
   
-  <xsl:template match="d:categories">
+  <xsl:template match="d:categories" mode="short">
     <xsl:if test="count(child::*) > 0">
       <h3>Categories</h3>
       <table border="1" class="categories">

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl	2011-12-19 14:55:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl	2011-12-20 08:57:21 +0000
@@ -7,12 +7,30 @@
   <xsl:include href="identifiable-row.xsl"/>
 
   <!-- match all plural elements -->
-  <xsl:template match="d:resources|d:maps|d:charts|d:categories|d:categoryCombos|
+  <xsl:template match="d:resources|d:maps|d:charts|d:categoryCombos|d:categories|
     d:categoryOptions|d:categoryOptionCombos|d:dataElements|d:indicators|
-    d:organisationUnits|d:dataElementGroups|d:dataElementGroupSets|
+    d:organisationUnits|d:dataElementGroups|d:dataElementGroupSets|d:dataSets|
     d:documents|d:indicatorGroups|d:indicatorGroupSets|d:organisationUnitGroups|
-    d:organisationUnitGroupSets|d:indicatorTypes|d:attributeTypes|d:reports|
+    d:organisationUnitGroupSets|d:indicatorTypes|d:attributeTypes|d:reports|d:constants|
     d:sqlViews|d:validationRules|d:validationRuleGroups|d:users|d:reportTables">
+
+    <xsl:choose>
+      <xsl:when test="@page">
+        <table>
+          <tr>
+            <td>Page <xsl:value-of select="@page" /> / <xsl:value-of select="@pageCount" /></td>
+          </tr>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+        <table>
+          <tr>
+            <td>Page 1 / 1</td>
+          </tr>
+        </table>
+      </xsl:otherwise>
+    </xsl:choose>
+
     <h3> <xsl:value-of select="local-name()" /> </h3>
 
     <table>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl	2011-12-15 19:34:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl	2011-12-20 08:57:21 +0000
@@ -69,7 +69,7 @@
     </table>
   </xsl:template>
 
-  <xsl:template match="d:dataSets">
+  <xsl:template match="d:dataSets" mode="short">
     <xsl:if test="count(child::*) > 0">
       <h3>DataSets</h3>
       <table class="dataSets">

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl	2011-12-15 19:34:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/resource.xsl	2011-12-20 08:57:21 +0000
@@ -13,4 +13,4 @@
     </xsl:if>
   </xsl:template>
 
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>