dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15201
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5394: added rendering of sqlView, validationRule and validationRuleGroup
------------------------------------------------------------
revno: 5394
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-12-13 18:44:28 +0100
message:
added rendering of sqlView, validationRule and validationRuleGroup
added:
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/sqlView.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRule.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRuleGroup.xsl
modified:
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/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-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 2011-12-07 16:03:19 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/dataSet.xsl 2011-12-13 17:44:28 +0000
@@ -46,5 +46,5 @@
</table>
</xsl:if>
</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 2011-12-13 14:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl 2011-12-13 17:44:28 +0000
@@ -11,7 +11,8 @@
d:categoryOptions|d:categoryOptionCombos|d:dataElements|d:indicators|
d:organisationUnits|d:dataElementGroups|d:dataElementGroupSets|
d:indicatorGroups|d:indicatorGroupSets|d:organisationUnitGroups|
- d:organisationUnitGroupSets|d:indicatorTypes|d:attributeTypes|d:reports">
+ d:organisationUnitGroupSets|d:indicatorTypes|d:attributeTypes|d:reports|
+ d:sqlViews|d:validationRules|d:validationRuleGroups">
<h3> <xsl:value-of select="local-name()"/> </h3>
<table border="1">
=== 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 2011-12-13 14:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/model2html.xsl 2011-12-13 17:44:28 +0000
@@ -36,6 +36,9 @@
<xsl:include href="dataSet.xsl"/>
<xsl:include href="attributeType.xsl"/>
<xsl:include href="report.xsl"/>
+ <xsl:include href="validationRule.xsl"/>
+ <xsl:include href="validationRuleGroup.xsl"/>
+ <xsl:include href="sqlView.xsl"/>
<!-- etc ... -->
</xsl:stylesheet>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/sqlView.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/sqlView.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/sqlView.xsl 2011-12-13 17:44:28 +0000
@@ -0,0 +1,33 @@
+<?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:sqlView">
+ <div class="sqlView">
+ <h2>
+ <xsl:value-of select="@name" />
+ </h2>
+ <table border="1">
+ <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>Description</td>
+ <td> <xsl:value-of select="d:description" /> </td>
+ </tr>
+ <tr>
+ <td>SqlQuery</td>
+ <td> <xsl:value-of select="d:sqlQuery" /> </td>
+ </tr>
+ </table>
+ </div>
+ </xsl:template>
+
+</xsl:stylesheet>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRule.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRule.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRule.xsl 2011-12-13 17:44:28 +0000
@@ -0,0 +1,76 @@
+<?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:validationRule">
+ <div class="validationRule">
+ <h2>
+ <xsl:value-of select="@name" />
+ </h2>
+ <table border="1">
+ <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>Description</td>
+ <td> <xsl:value-of select="d:description" /> </td>
+ </tr>
+ <tr>
+ <td>Operator</td>
+ <td> <xsl:value-of select="d:operator" /> </td>
+ </tr>
+ <tr>
+ <td>Type</td>
+ <td> <xsl:value-of select="d:type" /> </td>
+ </tr>
+ </table>
+
+ <xsl:apply-templates select="d:leftSide|d:rightSide|d:validationRuleGroups" mode="short" />
+ </div>
+ </xsl:template>
+
+ <xsl:template match="d:leftSide" mode="short">
+ <h3>LeftSide Expression</h3>
+ <table border="1" class="expression">
+ <tr>
+ <td>Description</td>
+ <td> <xsl:value-of select="d:description" /> </td>
+ </tr>
+ <tr>
+ <td>Expression</td>
+ <td> <xsl:value-of select="d:expression" /> </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="d:rightSide" mode="short">
+ <h3>RightSide Expression</h3>
+ <table border="1" class="expression">
+ <tr>
+ <td>Description</td>
+ <td> <xsl:value-of select="d:description" /> </td>
+ </tr>
+ <tr>
+ <td>Expression</td>
+ <td> <xsl:value-of select="d:expression" /> </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="d:validationRules" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>ValidationRules</h3>
+ <table border="1" class="validationRules">
+ <xsl:apply-templates select="child::*" mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRuleGroup.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRuleGroup.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/validationRuleGroup.xsl 2011-12-13 17:44:28 +0000
@@ -0,0 +1,40 @@
+<?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:validationRuleGroup">
+ <div class="validationRuleGroup">
+ <h2>
+ <xsl:value-of select="@name" />
+ </h2>
+ <table border="1">
+ <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>Description</td>
+ <td> <xsl:value-of select="d:description" /> </td>
+ </tr>
+ </table>
+
+ <xsl:apply-templates select="d:validationRules" mode="short" />
+ </div>
+ </xsl:template>
+
+ <xsl:template match="d:validationRuleGroups" mode="short">
+ <xsl:if test="count(child::*) > 0">
+ <h3>ValidationRuleGroups</h3>
+ <table border="1" class="validationRuleGroups">
+ <xsl:apply-templates select="child::*" mode="row"/>
+ </table>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>