dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22849
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11122: improved rendering of programstages (web-api)
------------------------------------------------------------
revno: 11122
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-05-31 12:04:24 +0700
message:
improved rendering of programstages (web-api)
added:
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/programStage.xsl
modified:
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/program.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/model2html.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl 2013-05-31 04:47:04 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl 2013-05-31 05:04:24 +0000
@@ -56,6 +56,7 @@
<xsl:include href="dataValueSets.xsl" />
<xsl:include href="optionSets.xsl" />
<xsl:include href="program.xsl" />
+ <xsl:include href="programStage.xsl" />
<!-- Config elements -->
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/program.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/program.xsl 2013-05-31 04:50:52 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/program.xsl 2013-05-31 05:04:24 +0000
@@ -87,8 +87,25 @@
</tr>
</table>
- <xsl:apply-templates select="d:programStages|d:userRoles|d:organisationUnits" mode="short" />
+ <xsl:apply-templates select="d:programStages|d:userRoles" mode="short" />
+ <xsl:apply-templates select="d:organisationUnits" mode="short" />
</div>
</xsl:template>
+ <xsl:template match="d:program" mode="short">
+ <h3>Program</h3>
+ <table>
+ <xsl:apply-templates select="." mode="row"/>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="d:programs" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>Programs</h3>
+ <table class="programs">
+ <xsl:apply-templates mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
</xsl:stylesheet>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/programStage.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/programStage.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/programStage.xsl 2013-05-31 05:04:24 +0000
@@ -0,0 +1,79 @@
+<?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:programStage">
+ <div class="programStage">
+ <h2> <xsl:value-of select="@name" /> </h2>
+
+ <table>
+ <tr>
+ <td>ID</td>
+ <td> <xsl:value-of select="@id" /> </td>
+ </tr>
+ <tr>
+ <td>Created</td>
+ <td> <xsl:value-of select="@created" /> </td>
+ </tr>
+ <tr>
+ <td>Last Updated</td>
+ <td> <xsl:value-of select="@lastUpdated" /> </td>
+ </tr>
+ <tr>
+ <td>description</td>
+ <td> <xsl:value-of select="d:description" /> </td>
+ </tr>
+ <tr>
+ <td>minDaysFromStart</td>
+ <td> <xsl:value-of select="d:minDaysFromStart" /> </td>
+ </tr>
+ <tr>
+ <td>irregular</td>
+ <td> <xsl:value-of select="d:irregular" /> </td>
+ </tr>
+ <tr>
+ <td>reportDateDescription</td>
+ <td> <xsl:value-of select="d:reportDateDescription" /> </td>
+ </tr>
+ <tr>
+ <td>autoGenerateEvent</td>
+ <td> <xsl:value-of select="d:autoGenerateEvent" /> </td>
+ </tr>
+ <tr>
+ <td>validCompleteOnly</td>
+ <td> <xsl:value-of select="d:validCompleteOnly" /> </td>
+ </tr>
+ <tr>
+ <td>validCompleteOnly</td>
+ <td> <xsl:value-of select="d:validCompleteOnly" /> </td>
+ </tr>
+ <tr>
+ <td>displayGenerateEventBox</td>
+ <td> <xsl:value-of select="d:displayGenerateEventBox" /> </td>
+ </tr>
+ <tr>
+ <td>dataEntryType</td>
+ <td> <xsl:value-of select="d:dataEntryType" /> </td>
+ </tr>
+ <tr>
+ <td>defaultTemplateMessage</td>
+ <td> <xsl:value-of select="d:defaultTemplateMessage" /> </td>
+ </tr>
+ </table>
+
+ <xsl:apply-templates select="d:program" mode="short" />
+ </div>
+ </xsl:template>
+
+ <xsl:template match="d:programStages" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>ProgramStages</h3>
+ <table class="programStages">
+ <xsl:apply-templates mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>