← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11990: finished html rendering of dashboards

 

------------------------------------------------------------
revno: 11990
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-09 15:50:00 +0200
message:
  finished html rendering of dashboards
modified:
  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/dashboard.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/document.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl
  dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/report.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/chart.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl	2013-05-31 04:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/chart.xsl	2013-09-09 13:50:00 +0000
@@ -123,4 +123,13 @@
     </div>
   </xsl:template>
 
+  <xsl:template match="d:chart" mode="short">
+    <xsl:if test="@name">
+      <h3>Chart</h3>
+      <table class="chart">
+        <xsl:apply-templates select="." mode="row"/>
+      </table>
+    </xsl:if>
+  </xsl:template>
+
 </xsl:stylesheet>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dashboard.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dashboard.xsl	2013-09-09 12:45:37 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dashboard.xsl	2013-09-09 13:50:00 +0000
@@ -37,14 +37,8 @@
   </xsl:template>
 
   <xsl:template match="d:dashboardItem" mode="short">
-    <table>
-      <tr>
-        <td>Type</td>
-        <td><xsl:value-of select="d:type" /></td>
-      </tr>
-    </table>
-
-    <xsl:apply-templates select="d:users|d:documents|d:reportTables|d:reports" mode="short" />
+    <h4 style="border-bottom: 1px solid black; width: 800px;">Dashboard Item (<xsl:value-of select="d:type" />)</h4>
+    <xsl:apply-templates select="d:users|d:documents|d:reportTables|d:reports|d:reportTable|d:chart" mode="short" />
   </xsl:template>
 
 </xsl:stylesheet>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/document.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/document.xsl	2013-05-31 04:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/document.xsl	2013-09-09 13:50:00 +0000
@@ -44,4 +44,13 @@
     </div>
   </xsl:template>
 
+  <xsl:template match="d:documents" mode="short">
+    <xsl:if test="count(child::*) > 0">
+      <h3>Documents</h3>
+      <table class="documents">
+        <xsl:apply-templates select="child::*" mode="row"/>
+      </table>
+    </xsl:if>
+  </xsl:template>
+
 </xsl:stylesheet>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl	2013-07-23 07:24:20 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/identifiable-row.xsl	2013-09-09 13:50:00 +0000
@@ -3,16 +3,18 @@
                 xmlns="http://www.w3.org/1999/xhtml"; xmlns:d="http://dhis2.org/schema/dxf/2.0";>
 
   <xsl:template match="*" mode="row">
-    <tr>
-      <td> <xsl:value-of select="@name"/> </td>
-      <td> <a href="{@href}">html</a> </td>
-      <td> <a href="{@href}.xml">xml</a> </td>
-      <td> <a href="{@href}.json">json</a> </td>
-      <td> <a href="{@href}.jsonp">jsonp</a> </td>
-      <td> <a href="{@href}.pdf">pdf</a> </td>
-      <td> <a href="{@href}.xls">xls</a> </td>
-      <td> <a href="{@href}.csv">csv</a> </td>
-    </tr>
+    <xsl:if test="@name">
+      <tr>
+        <td> <xsl:value-of select="@name"/> </td>
+        <td> <a href="{@href}">html</a> </td>
+        <td> <a href="{@href}.xml">xml</a> </td>
+        <td> <a href="{@href}.json">json</a> </td>
+        <td> <a href="{@href}.jsonp">jsonp</a> </td>
+        <td> <a href="{@href}.pdf">pdf</a> </td>
+        <td> <a href="{@href}.xls">xls</a> </td>
+        <td> <a href="{@href}.csv">csv</a> </td>
+      </tr>
+    </xsl:if>
   </xsl:template>
 
 </xsl:stylesheet>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl	2013-05-31 04:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/map.xsl	2013-09-09 13:50:00 +0000
@@ -28,4 +28,11 @@
     </div>
   </xsl:template>
 
+  <xsl:template match="d:map" mode="short">
+    <h3>Map</h3>
+    <table class="map">
+      <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/report.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/report.xsl	2013-05-31 04:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/report.xsl	2013-09-09 13:50:00 +0000
@@ -51,11 +51,22 @@
   </div>
   </xsl:template>
 
+  <xsl:template match="d:reports" mode="short">
+    <xsl:if test="count(child::*) > 0">
+      <h3>Reports</h3>
+      <table class="reports">
+        <xsl:apply-templates select="child::*" mode="row"/>
+      </table>
+    </xsl:if>
+  </xsl:template>
+
   <xsl:template match="d:reportTable" mode="short">
-    <h3>ReportTable</h3>
-    <table class="reportTable">
-      <xsl:apply-templates select="." mode="row"/>
-    </table>
+    <xsl:if test="@name">
+      <h3>ReportTable</h3>
+      <table class="reportTable">
+        <xsl:apply-templates select="." mode="row"/>
+      </table>
+    </xsl:if>
   </xsl:template>
 
 </xsl:stylesheet>