← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9237: WEB-API: fixes issues with html rendering of sections, userRoles, organisationUnitLevels. Also ma...

 

------------------------------------------------------------
revno: 9237
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-12-09 13:12:53 +0300
message:
  WEB-API: fixes issues with html rendering of sections, userRoles, organisationUnitLevels. Also made minor adjustment to jackson annotations, to work around a bug.
added:
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitLevel.xsl
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java
  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/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/BaseIdentifiableObject.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java	2012-11-29 16:21:29 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/BaseIdentifiableObject.java	2012-12-09 10:12:53 +0000
@@ -134,7 +134,7 @@
     }
 
     @JsonProperty( value = "id" )
-    @JacksonXmlProperty( isAttribute = true )
+    @JacksonXmlProperty( localName = "id", isAttribute = true )
     public String getUid()
     {
         return uid;

=== 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	2012-10-25 17:18:52 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl	2012-12-09 10:12:53 +0000
@@ -18,7 +18,8 @@
       d:documents|d:indicatorGroups|d:indicatorGroupSets|d:organisationUnitGroups|
       d:organisationUnitGroupSets|d:indicatorTypes|d:attributeTypes|d:reports|d:constants|
       d:sqlViews|d:validationRules|d:validationRuleGroups|d:users|d:userGroups|d:userAuthorityGroups|
-      d:reportTables|d:mapLegends|d:mapLegendSets|d:mapLayers|d:optionSets|d:interpretations">
+      d:reportTables|d:mapLegends|d:mapLegendSets|d:mapLayers|d:optionSets|d:interpretations|
+      d:sections|d:userRoles|d:organisationUnitLevels">
 
     <h3>
       <xsl:value-of select="local-name()" />

=== 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-10-25 17:18:52 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl	2012-12-09 10:12:53 +0000
@@ -36,6 +36,7 @@
   <xsl:include href="indicatorGroup.xsl" />
   <xsl:include href="indicatorGroupSet.xsl" />
   <xsl:include href="organisationUnit.xsl" />
+  <xsl:include href="organisationUnitLevel.xsl" />
   <xsl:include href="organisationUnitGroup.xsl" />
   <xsl:include href="organisationUnitGroupSet.xsl" />
   <xsl:include href="dataSet.xsl" />

=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitLevel.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitLevel.xsl	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnitLevel.xsl	2012-12-09 10:12:53 +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:organisationUnitLevel">
+    <div class="organisationUnitLevel">
+      <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>Level</td>
+          <td> <xsl:value-of select="@level" /> </td>
+        </tr>
+      </table>
+    </div>
+  </xsl:template>
+
+</xsl:stylesheet>