~technofluid-team/openobject-addons/technofluid_multiple_installations

« back to all changes in this revision

Viewing changes to custom/corporate_defaults.xsl

  • Committer: pinky
  • Date: 2006-12-07 13:41:40 UTC
  • Revision ID: pinky-dedd7f8a42bd4557112a0513082691b8590ad6cc
New trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version = '1.0' encoding="utf-8"?>
 
2
 
 
3
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
 
4
        <xsl:variable name="signature" select="//corporate-header/user/signature"/>
 
5
        <xsl:variable name="title">Tiny ERP Report</xsl:variable>
 
6
        <xsl:variable name="leftMargin">1cm</xsl:variable>
 
7
        <xsl:variable name="rightMargin">1cm</xsl:variable>
 
8
        <xsl:variable name="topMargin">1cm</xsl:variable>
 
9
        <xsl:variable name="bottomMargin">1cm</xsl:variable>
 
10
        <xsl:variable name="pageSize">21cm,29.7cm</xsl:variable>
 
11
 
 
12
        <xsl:variable name="page_format">a4_letter</xsl:variable>
 
13
 
 
14
        <xsl:template name="first_page_graphics_corporation">
 
15
                <!--logo-->
 
16
                <setFont name="Helvetica" size="30"/>
 
17
                <fill color="darkblue"/>
 
18
                <stroke color="darkblue"/>
 
19
                <drawString x="1cm" y="27.8cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
 
20
                <lines>1cm 27.7cm 20cm 27.7cm</lines>
 
21
                <lines>1cm 25.7cm 7cm 25.7cm</lines>
 
22
 
 
23
                <setFont name="Helvetica" size="10"/>
 
24
                <drawRightString x="20cm" y="27.8cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
 
25
                <drawString x="1cm" y="27.1cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
 
26
                <drawString x="1cm" y="26.7cm">
 
27
                        <xsl:value-of select="//corporate-header/corporation/address/zip"/>
 
28
                        <xsl:text> </xsl:text>
 
29
                        <xsl:value-of select="//corporate-header/corporation/address/city"/>
 
30
                        <xsl:text> - </xsl:text>
 
31
                        <xsl:value-of select="//corporate-header/corporation/address/country"/>
 
32
                </drawString>
 
33
                <drawString x="1cm" y="26.2cm">Phone:</drawString>
 
34
                <drawRightString x="7cm" y="26.2cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
 
35
                <drawString x="1cm" y="25.8cm">Mail:</drawString>
 
36
                <drawRightString x="7cm" y="25.8cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
 
37
 
 
38
                <!--page bottom-->
 
39
                
 
40
                <lines>1.5cm 2.15cm 19.9cm 2.15cm</lines>
 
41
                
 
42
                <drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
 
43
                <drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
 
44
                <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>
 
45
        </xsl:template>
 
46
 
 
47
        <xsl:template name="other_pages_graphics_corporation">
 
48
                <!--logo-->
 
49
                <setFont name="Helvetica" size="30"/>
 
50
                <fill color="darkblue"/>
 
51
                <stroke color="darkblue"/>
 
52
                <drawString x="1cm" y="27.8cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
 
53
                <lines>1cm 27.7cm 20cm 27.7cm</lines>
 
54
                <lines>1cm 25.7cm 7cm 25.7cm</lines>
 
55
 
 
56
                <setFont name="Helvetica" size="10"/>
 
57
                <drawRightString x="20cm" y="27.8cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
 
58
                <drawString x="1cm" y="27.1cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
 
59
                <drawString x="1cm" y="26.7cm">
 
60
                        <xsl:value-of select="//corporate-header/corporation/address/zip"/>
 
61
                        <xsl:value-of select="//corporate-header/corporation/address/city"/> - 
 
62
                        <xsl:value-of select="//corporate-header/corporation/address/country"/>
 
63
                </drawString>
 
64
                <drawString x="1cm" y="26.2cm">Phone:</drawString>
 
65
                <drawRightString x="7cm" y="26.2cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
 
66
                <drawString x="1cm" y="25.8cm">Mail:</drawString>
 
67
                <drawRightString x="7cm" y="25.8cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
 
68
 
 
69
                <!--page bottom-->
 
70
                
 
71
                <lines>1.5cm 2.15cm 19.9cm 2.15cm</lines>
 
72
                
 
73
                <drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
 
74
                <drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
 
75
                <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>
 
76
        </xsl:template>
 
77
 
 
78
        <xsl:template name="first_page_frames">
 
79
                <xsl:if test="$page_format='a4_normal'">
 
80
                        <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22.0cm"/>
 
81
                </xsl:if>
 
82
 
 
83
                <xsl:if test="$page_format='a4_letter'">
 
84
                        <frame id="address" x1="11cm" y1="21.5cm" width="6cm" height="4cm"/>
 
85
                        <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="17.5cm"/>
 
86
                </xsl:if>
 
87
        </xsl:template>
 
88
 
 
89
        <xsl:template name="other_pages_frames">
 
90
                <frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22cm"/>
 
91
        </xsl:template>
 
92
 
 
93
</xsl:stylesheet>