← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6404: even more xsl fixes

 

------------------------------------------------------------
revno: 6404
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-03-27 22:10:41 +0200
message:
  even more xsl fixes
added:
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.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/model2html.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.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/chart/Chart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java	2012-03-27 20:10:41 +0000
@@ -583,7 +583,7 @@
     }
 
     @JsonProperty
-    @JsonSerialize( contentAs = BaseIdentifiableObject.class )
+    @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( {DetailedView.class, ExportView.class} )
     @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public User getUser()

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java	2012-03-20 14:42:51 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataentryform/DataEntryForm.java	2012-03-27 20:10:41 +0000
@@ -191,7 +191,7 @@
 
     @JsonProperty
     @JsonView( {DetailedView.class, ExportView.class} )
-    @JacksonXmlProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public String getName()
     {
         return name;
@@ -204,7 +204,7 @@
 
     @JsonProperty
     @JsonView( {DetailedView.class, ExportView.class} )
-    @JacksonXmlProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public String getHtmlCode()
     {
         return htmlCode;

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/indicator/IndicatorGroup.java	2012-03-27 20:10:41 +0000
@@ -163,7 +163,6 @@
     @JsonProperty( value = "indicatorGroupSet" )
     @JsonSerialize( as = BaseIdentifiableObject.class )
     @JsonView( {DetailedView.class, ExportView.class} )
-    @JacksonXmlElementWrapper( localName = "indicatorGroupSets", namespace = Dxf2Namespace.NAMESPACE )
     @JacksonXmlProperty( localName = "indicatorGroupSet", namespace = Dxf2Namespace.NAMESPACE )
     public IndicatorGroupSet getGroupSet()
     {

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-03-18 20:26:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java	2012-03-27 20:10:41 +0000
@@ -28,6 +28,7 @@
  */
 
 import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
 import org.hisp.dhis.common.Dxf2Namespace;
 import org.hisp.dhis.i18n.I18nFormat;
@@ -538,6 +539,7 @@
     // -------------------------------------------------------------------------
 
     @JsonProperty( value = "lastMonth" )
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isReportingMonth()
     {
         return reportingMonth;
@@ -550,6 +552,7 @@
     }
 
     @JsonProperty( value = "lastBimonth" )
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isReportingBimonth()
     {
         return reportingBimonth;
@@ -562,6 +565,7 @@
     }
 
     @JsonProperty( value = "lastQuarter" )
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isReportingQuarter()
     {
         return reportingQuarter;
@@ -574,6 +578,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isLastSixMonth()
     {
         return lastSixMonth;
@@ -585,6 +590,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isMonthsThisYear()
     {
         return monthsThisYear;
@@ -597,6 +603,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isQuartersThisYear()
     {
         return quartersThisYear;
@@ -609,6 +616,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isThisYear()
     {
         return thisYear;
@@ -621,6 +629,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isMonthsLastYear()
     {
         return monthsLastYear;
@@ -633,6 +642,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isQuartersLastYear()
     {
         return quartersLastYear;
@@ -645,6 +655,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isLastYear()
     {
         return lastYear;
@@ -657,6 +668,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isLast5Years()
     {
         return last5Years;
@@ -669,6 +681,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isLast12Months()
     {
         return last12Months;
@@ -681,6 +694,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isLast6BiMonths()
     {
         return last6BiMonths;
@@ -693,6 +707,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isLast4Quarters()
     {
         return last4Quarters;
@@ -705,6 +720,7 @@
     }
 
     @JsonProperty
+    @JacksonXmlProperty( namespace = Dxf2Namespace.NAMESPACE )
     public boolean isLast2SixMonths()
     {
         return last2SixMonths;

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl	2012-03-27 20:10:41 +0000
@@ -72,8 +72,16 @@
           <td> <xsl:value-of select="@d:code" /> </td>
         </tr>
         <tr>
-          <td>Dimension</td>
-          <td> <xsl:value-of select="d:dimension"/> </td>
+          <td>Series</td>
+          <td> <xsl:value-of select="d:series"/> </td>
+        </tr>
+        <tr>
+          <td>Category</td>
+          <td> <xsl:value-of select="d:category"/> </td>
+        </tr>
+        <tr>
+          <td>Filter</td>
+          <td> <xsl:value-of select="d:filter"/> </td>
         </tr>
         <tr>
           <td>Hide legend</td>
@@ -84,22 +92,10 @@
           <td> <xsl:value-of select="d:hideSubtitle"/> </td>
         </tr>
         <tr>
-          <td>Horizontal Pilot  Orientation</td>
-          <td> <xsl:value-of select="d:horizontalPlotOrientation"/> </td>
-        </tr>
-        <tr>
           <td>Regression</td>
           <td> <xsl:value-of select="d:regression"/> </td>
         </tr>
         <tr>
-          <td>Size</td>
-          <td> <xsl:value-of select="d:size"/> </td>
-        </tr>
-        <tr>
-          <td>Target line</td>
-          <td> <xsl:value-of select="d:targetLine"/> </td>
-        </tr>
-        <tr>
           <td>Target line label</td>
           <td> <xsl:value-of select="d:targetLineLabel"/> </td>
         </tr>
@@ -111,13 +107,10 @@
           <td>User organisation unit</td>
           <td> <xsl:value-of select="d:userOrganisationUnit"/> </td>
         </tr>
-        <tr>
-          <td>Vertical labels</td>
-          <td> <xsl:value-of select="d:verticalLabels"/> </td>
-        </tr>
       </table>
 
       <xsl:apply-templates select="d:organisationUnits|d:dataElements|d:indicators" mode="short"/>
+      <xsl:apply-templates select="d:relativePeriods" />
 
     </div>
   </xsl:template>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl	2012-03-27 20:10:41 +0000
@@ -27,6 +27,10 @@
           <td> <xsl:value-of select="d:shortName" /> </td>
         </tr>
         <tr>
+          <td>Expiry Days</td>
+          <td> <xsl:value-of select="d:expiryDays" /> </td>
+        </tr>
+        <tr>
           <td>Version</td>
           <td> <xsl:value-of select="d:version" /> </td>
         </tr>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicator.xsl	2012-03-27 20:10:41 +0000
@@ -27,6 +27,10 @@
           <td> <xsl:value-of select="d:shortName" /> </td>
         </tr>
         <tr>
+          <td>Description</td>
+          <td> <xsl:value-of select="d:description" /> </td>
+        </tr>
+        <tr>
           <td>Denominator</td>
           <td> <xsl:value-of select="d:denominator" /> </td>
         </tr>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroup.xsl	2012-03-27 20:10:41 +0000
@@ -23,7 +23,7 @@
         </tr>
       </table>
 
-      <xsl:apply-templates select="d:indicators" mode="short"/>
+      <xsl:apply-templates select="d:indicators|d:indicatorGroupSet" mode="short"/>
     </div>
   </xsl:template>
 

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.xsl	2012-03-27 17:38:48 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/indicatorGroupSet.xsl	2012-03-27 20:10:41 +0000
@@ -21,10 +21,21 @@
           <td>Code</td>
           <td> <xsl:value-of select="@d:code" /> </td>
         </tr>
+        <tr>
+          <td>Compulsory</td>
+          <td> <xsl:value-of select="d:compulsory" /> </td>
+        </tr>
       </table>
 
       <xsl:apply-templates select="d:indicatorGroups" mode="short"/>
     </div>
   </xsl:template>
 
+  <xsl:template match="d:indicatorGroupSet" mode="short">
+    <h3>Indicator Group Set</h3>
+    <table class="indicatorGroupSet">
+      <xsl:apply-templates select="." mode="row"/>
+    </table>
+  </xsl:template>
+
 </xsl:stylesheet>

=== 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-03-27 17:52:58 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl	2012-03-27 20:10:41 +0000
@@ -9,7 +9,6 @@
   <!-- match all plural elements -->
   <xsl:template match="d:dxf2">
     <xsl:apply-templates select="d:pager"/>
-    <!-- <xsl:apply-templates select="d:*"/> -->
     <xsl:apply-templates select="d:*[local-name()!='pager']"/>
   </xsl:template>
 

=== 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-01-11 09:02:20 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl	2012-03-27 20:10:41 +0000
@@ -15,6 +15,7 @@
 
   <!-- for rendering elements -->
   <xsl:include href="resource.xsl" />
+  <xsl:include href="relativePeriods.xsl" />
   <xsl:include href="map.xsl" />
   <xsl:include href="chart.xsl" />
   <xsl:include href="category.xsl" />

=== 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	2012-03-27 18:33:54 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/organisationUnit.xsl	2012-03-27 20:10:41 +0000
@@ -26,6 +26,10 @@
           <td> <xsl:value-of select="d:shortName" /> </td>
         </tr>
         <tr>
+          <td>Period Type</td>
+          <td> <xsl:value-of select="d:periodType" /> </td>
+        </tr>
+        <tr>
           <td>Opening Date</td>
           <td> <xsl:value-of select="d:openingDate" /> </td>
         </tr>

=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/relativePeriods.xsl	2012-03-27 20:10:41 +0000
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+                xmlns="http://www.w3.org/1999/xhtml";
+                xmlns:d="http://dhis2.org/schema/dxf/2.0";
+                version="1.0">
+
+  <xsl:template match="d:relativePeriods">
+    <div class="relativePeriods">
+      <h2>Relative Periods</h2>
+
+	  <table>
+      <tr>
+        <td>lastSixMonth</td>
+        <td> <xsl:value-of select="d:lastSixMonth"/> </td>
+      </tr>
+      <tr>
+        <td>monthsThisYear</td>
+        <td> <xsl:value-of select="d:monthsThisYear"/> </td>
+      </tr>
+      <tr>
+        <td>quartersThisYear</td>
+        <td> <xsl:value-of select="d:quartersThisYear"/> </td>
+      </tr>
+      <tr>
+        <td>thisYear</td>
+        <td> <xsl:value-of select="d:thisYear"/> </td>
+      </tr>
+      <tr>
+        <td>monthsLastYear</td>
+        <td> <xsl:value-of select="d:monthsLastYear"/> </td>
+      </tr>
+      <tr>
+        <td>quartersLastYear</td>
+        <td> <xsl:value-of select="d:quartersLastYear"/> </td>
+      </tr>
+      <tr>
+        <td>lastYear</td>
+        <td> <xsl:value-of select="d:lastYear"/> </td>
+      </tr>
+      <tr>
+        <td>last5Years</td>
+        <td> <xsl:value-of select="d:last5Years"/> </td>
+      </tr>
+      <tr>
+        <td>last12Months</td>
+        <td> <xsl:value-of select="d:last12Months"/> </td>
+      </tr>
+      <tr>
+        <td>last6BiMonths</td>
+        <td> <xsl:value-of select="d:last6BiMonths"/> </td>
+      </tr>
+      <tr>
+        <td>last4Quarters</td>
+        <td> <xsl:value-of select="d:last4Quarters"/> </td>
+      </tr>
+      <tr>
+        <td>last2SixMonths</td>
+        <td> <xsl:value-of select="d:last2SixMonths"/> </td>
+      </tr>
+      <tr>
+        <td>lastMonth</td>
+        <td> <xsl:value-of select="d:lastMonth"/> </td>
+      </tr>
+      <tr>
+        <td>lastBimonth</td>
+        <td> <xsl:value-of select="d:lastBimonth"/> </td>
+      </tr>
+      <tr>
+        <td>lastQuarter</td>
+        <td> <xsl:value-of select="d:lastQuarter"/> </td>
+      </tr>
+    </table>
+
+    </div>
+  </xsl:template>
+
+</xsl:stylesheet>