dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15296
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5478: minor fix to pdf rendering
------------------------------------------------------------
revno: 5478
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-12-19 15:55:04 +0100
message:
minor fix to pdf rendering
added:
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/identifiable-row.xsl
dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/pdf-wrapper.xsl
modified:
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/pdf/list.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/list.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl 2011-12-15 19:34:24 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/html/list.xsl 2011-12-19 14:55:04 +0000
@@ -13,7 +13,7 @@
d:documents|d:indicatorGroups|d:indicatorGroupSets|d:organisationUnitGroups|
d:organisationUnitGroupSets|d:indicatorTypes|d:attributeTypes|d:reports|
d:sqlViews|d:validationRules|d:validationRuleGroups|d:users|d:reportTables">
- <h3> <xsl:value-of select="local-name()"/> </h3>
+ <h3> <xsl:value-of select="local-name()" /> </h3>
<table>
<xsl:apply-templates select="child::*" mode="row"/>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/identifiable-row.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/identifiable-row.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/identifiable-row.xsl 2011-12-19 14:55:04 +0000
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns="http://www.w3.org/1999/xhtml">
+
+ <xsl:template match="*" mode="row">
+ <fo:block font-size="10pt" font-weight="bold" border-bottom="1pt solid black"><xsl:value-of select="@name" /></fo:block>
+
+ <fo:table border-top="1pt solid black" margin-bottom="9pt" table-layout="fixed">
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell><fo:block>ID</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="@id" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>Code</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="@code" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ <fo:table-row>
+ <fo:table-cell><fo:block>Last Updated</fo:block></fo:table-cell>
+ <fo:table-cell><fo:block><xsl:value-of select="@lastUpdated" /></fo:block></fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+
+ </xsl:template>
+
+</xsl:stylesheet>
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl 2011-12-07 14:04:35 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/list.xsl 2011-12-19 14:55:04 +0000
@@ -5,9 +5,17 @@
xmlns:d="http://dhis2.org/schema/dxf/2.0"
>
- <xsl:output method="xml" />
-
- <xsl:template match="/">
+ <xsl:output method="pdf" />
+
+ <xsl:include href="identifiable-row.xsl"/>
+
+ <xsl:template match="d:resources|d:maps|d:charts|d:categories|d:categoryCombos|
+ d:categoryOptions|d:categoryOptionCombos|d:dataElements|d:indicators|
+ d:organisationUnits|d:dataElementGroups|d:dataElementGroupSets|
+ d:documents|d:indicatorGroups|d:indicatorGroupSets|d:organisationUnitGroups|
+ d:organisationUnitGroupSets|d:indicatorTypes|d:attributeTypes|d:reports|
+ d:sqlViews|d:validationRules|d:validationRuleGroups|d:users|d:reportTables">
+
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
@@ -17,15 +25,16 @@
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
- <fo:block font-size="20pt" border-bottom="2pt solid black" margin-bottom="20pt">DataElements</fo:block>
+ <fo:block font-size="20pt" border-bottom="2pt solid black" margin-bottom="20pt"><xsl:value-of select="local-name()" /></fo:block>
- <xsl:apply-templates />
+ <xsl:apply-templates select="child::*" mode="row"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
+ <!--
<xsl:template match="d:dataElement">
<fo:block font-size="12pt" font-weight="bold" border-bottom="1pt solid black"><xsl:value-of select="@name" /></fo:block>
<fo:table border-top="1pt solid black" margin-bottom="10pt" table-layout="fixed">
@@ -65,5 +74,5 @@
</fo:table-body>
</fo:table>
</xsl:template>
-
+-->
</xsl:stylesheet>
=== added file 'dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/pdf-wrapper.xsl'
--- dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/pdf-wrapper.xsl 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/resources/templates/pdf/pdf-wrapper.xsl 2011-12-19 14:55:04 +0000
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:d="http://dhis2.org/schema/dxf/2.0"
+ >
+
+ <xsl:output method="xml" />
+
+ <xsl:template match="/">
+ <fo:root>
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="A4">
+ <fo:region-body margin="1in" />
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+
+ <fo:page-sequence master-reference="A4">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block font-size="20pt" border-bottom="2pt solid black" margin-bottom="20pt">DataElements</fo:block>
+
+ <xsl:apply-templates />
+
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </xsl:template>
+
+</xsl:stylesheet>