svn commit: r429657 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/simple.fo.ftl widget/CommonScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r429657 - in /incubator/ofbiz/trunk/framework/common: webcommon/includes/simple.fo.ftl widget/CommonScreens.xml

jacopoc
Author: jacopoc
Date: Tue Aug  8 07:11:31 2006
New Revision: 429657

URL: http://svn.apache.org/viewvc?rev=429657&view=rev
Log:
New global decorator for simple pdf reports: it is composed of a small header with the current date, screen name and logo and a footer with number of page/pages.

Added:
    incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl   (with props)
Modified:
    incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml

Added: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl?rev=429657&view=auto
==============================================================================
--- incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl (added)
+++ incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl Tue Aug  8 07:11:31 2006
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<#--
+
+Copyright 2001-2006 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations
+under the License.
+-->
+
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+    <fo:layout-master-set>
+        <fo:simple-page-master master-name="main-page"
+            margin-top="0.3in" margin-bottom="0.3in"
+            margin-left="0.4in" margin-right="0.3in">
+          <fo:region-body margin-top="1in" margin-bottom="0.5in"/>  <#-- main body -->
+            <fo:region-after extent="0.5in" />  <#-- a footer -->
+            <fo:region-before extent="1in"/>  <#-- a header -->
+        </fo:simple-page-master>
+    </fo:layout-master-set>
+  
+    <fo:page-sequence master-reference="main-page" font-size="9pt">
+        <#-- Header -->
+        <fo:static-content flow-name="xsl-region-before" font-size="8pt">
+            <fo:table>
+                <fo:table-column column-width="4.5in"/>
+                <fo:table-column column-width="2in"/>
+                <fo:table-body>
+                    <fo:table-row>
+                        <fo:table-cell>
+                        <#if logoImageUrl?exists>
+                            <fo:external-graphic src="${logoImageUrl}" overflow="hidden" height="40px"/>
+                        </#if>
+                        </fo:table-cell>
+                        <fo:table-cell>
+                            <fo:block font-weight="bold" space-after="0.03in">${title?if_exists}</fo:block>
+                            <fo:block>${uiLabelMap.CommonDate}: ${nowTimestamp?if_exists}</fo:block>
+                        </fo:table-cell>
+                    </fo:table-row>
+                </fo:table-body>
+            </fo:table>
+            <fo:block white-space-collapse="false"> </fo:block>
+        </fo:static-content>
+        
+        <#-- Footer -->
+        <fo:static-content flow-name="xsl-region-after" font-size="8pt">
+            <fo:block text-align="center" border-top="thin solid black" padding="3pt">Page <fo:page-number/> of <fo:page-number-citation ref-id="theEnd"/></fo:block>
+        </fo:static-content>
+      
+        <#-- Body -->
+        <fo:flow flow-name="xsl-region-body">
+${sections.render("body")}
+            <fo:block id="theEnd"/>
+        </fo:flow>
+    </fo:page-sequence>
+</fo:root>

Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/common/webcommon/includes/simple.fo.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=429657&r1=429656&r2=429657&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ incubator/ofbiz/trunk/framework/common/widget/CommonScreens.xml Tue Aug  8 07:11:31 2006
@@ -162,4 +162,16 @@
         </section>
     </screen>
 
+    <!-- Simple fo decorator for pdf reports. -->
+    <screen name="FoDecorator">
+        <section>
+            <actions>
+            </actions>
+            <widgets>
+                <!-- render header -->
+                <platform-specific><html><html-template location="component://common/webcommon/includes/simple.fo.ftl"/></html></platform-specific>
+            </widgets>
+        </section>
+    </screen>
+
 </screens>