dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23015
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11193: rendering of programStageDataElements in programStages
------------------------------------------------------------
revno: 11193
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-06-11 11:59:27 +0700
message:
rendering of programStageDataElements in programStages
modified:
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/programStage.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/programStage.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/programStage.xsl 2013-05-31 05:04:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/programStage.xsl 2013-06-11 04:59:27 +0000
@@ -63,7 +63,7 @@
</tr>
</table>
- <xsl:apply-templates select="d:program" mode="short" />
+ <xsl:apply-templates select="d:program|d:programStageDataElements" mode="short" />
</div>
</xsl:template>
@@ -76,4 +76,38 @@
</xsl:if>
</xsl:template>
+ <xsl:template match="d:programStageDataElements" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>ProgramStage DataElements</h3>
+ <xsl:for-each select="d:programStageDataElement">
+ <table>
+ <tr>
+ <td>Compulsory</td>
+ <td colspan="4"> <xsl:value-of select="d:compulsory" /> </td>
+ </tr>
+ <tr>
+ <td>allowProvidedElsewhere</td>
+ <td colspan="4"> <xsl:value-of select="d:allowProvidedElsewhere" /> </td>
+ </tr>
+ <tr>
+ <td>displayInReports</td>
+ <td colspan="4"> <xsl:value-of select="d:displayInReports" /> </td>
+ </tr>
+ <xsl:call-template name="local-de" />
+ </table>
+ <br />
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+ <xsl:template name="local-de">
+ <tr>
+ <td> <xsl:value-of select="d:dataElement/@name"/> </td>
+ <td> <a href="../dataElements/{d:dataElement/@id}">html</a> </td>
+ <td> <a href="../dataElements/{d:dataElement/@id}.xml">xml</a> </td>
+ <td> <a href="../dataElements/{d:dataElement/@id}.json">json</a> </td>
+ <td> <a href="../dataElements/{d:dataElement/@id}.jsonp">jsonp</a> </td>
+ </tr>
+ </xsl:template>
+
</xsl:stylesheet>