← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8557: WIP web api interpretations

 

------------------------------------------------------------
revno: 8557
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-17 14:39:02 +0200
message:
  WIP web api interpretations
added:
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/interpretation.xsl
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Pager.java
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.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-api/src/main/java/org/hisp/dhis/common/Pager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Pager.java	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/Pager.java	2012-10-17 12:39:02 +0000
@@ -87,6 +87,11 @@
         }
     }
 
+    public String toString()
+    {
+        return "[Page: " + page + " total: " + total + " size: " + pageSize + " offset: " + getOffset() + "]";
+    }
+    
     @JsonProperty
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public int getPage()

=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/interpretation.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/interpretation.xsl	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/interpretation.xsl	2012-10-17 12:39:02 +0000
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
+  xmlns="http://www.w3.org/1999/xhtml";
+  xmlns:d="http://dhis2.org/schema/dxf/2.0";
+  >
+  
+  <xsl:template match="d:interpretation">
+    <div class="interpretation">
+      <h2>
+        <xsl:value-of select="@name" />
+      </h2>
+      <table>
+        <tr>
+          <td>ID</td>
+          <td> <xsl:value-of select="@id" /> </td>
+        </tr>
+        <tr>
+          <td>Last Updated</td>
+          <td> <xsl:value-of select="@lastUpdated" /> </td>
+        </tr>
+        <tr>
+          <td>Text</td>
+          <td> <xsl:value-of select="@text" /> </td>
+        </tr>
+      </table>
+    </div>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl	2012-05-30 13:29:47 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl	2012-10-17 12:39:02 +0000
@@ -50,6 +50,7 @@
   <xsl:include href="userCredentials.xsl" />
   <xsl:include href="messageConversations.xsl" />
   <xsl:include href="messageConversation.xsl" />
+  <xsl:include href="interpretation.xsl" />
   <xsl:include href="dataValueSets.xsl" />
   <xsl:include href="optionSets.xsl" />