diff --git a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_pdf.xml b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_pdf.xml index 431b20f2e063f2a7cbc340b8bcbf6cc6db3ca354..5fce7418940fe0bbae48cbaa92c14c768648be8c 100644 --- a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_pdf.xml +++ b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_pdf.xml @@ -57,13 +57,15 @@ <?xml version="1.0" encoding="utf-8" ?>\n <template filename="default.pdf"\n pagesize="A4"\n - landscape="0"\n + landscape="1"\n showboundary="1"\n leftmargin="1cm"\n rightmargin="1cm"\n topmargin="1cm"\n bottommargin="1cm"\n - allowsplitting="1">\n + allowsplitting="1"\n + tal:define="landscape python: int(request.get(\'landscape\', 0) or 0)"\n + tal:attributes="landscape landscape">\n \n <stylesheet>\n \n @@ -164,14 +166,31 @@ \n </stylesheet>\n \n + <pagetemplate tal:condition="landscape" id="FirstPage" nextid="FirstPage" startframe="content">\n + <static>\n + <infostring align="left" x="1cm" y= "20cm" size="8" font="Helvetica" color="(0,0,0)"\n + tal:content="python: here.Localizer.erp5_ui.gettext(\'Printed by %(user)s at %(date)s\') % {\'user\':user.getUserName(), \'date\':DateTime()}" >Printed by</infostring>\n + <infostring align="left" x="26.5cm" y= "0.5cm" size="10" font="Helvetica" color="(0,0,0)" >Page %(page)s</infostring>\n + </static>\n + <frame id="content"\n + nextid="content"\n + x="1.8cm"\n + y="0.6cm"\n + width="26cm"\n + height="19.5cm"\n + leftpadding="0.1cm"\n + rightpadding="0.1cm"\n + toppadding="0.2cm"\n + bottompadding="0.5cm"\n + showBoundary="1"/>\n + </pagetemplate>\n \n - <pagetemplate id="FirstPage" nextid="FirstPage" startframe="content">\n + <pagetemplate tal:condition="not: landscape" id="FirstPage" nextid="FirstPage" startframe="content">\n <static>\n - <infostring align="left" x="1cm" y= "29cm" size="8" font="Helvetica" color="(0,0,0)"\n + <infostring align="left" x="1cm" y= "29cm" size="8" font="Helvetica" color="(0,0,0)"\n tal:content="python: here.Localizer.erp5_ui.gettext(\'Printed by %(user)s at %(date)s\') % {\'user\':user.getUserName(), \'date\':DateTime()}" >Printed by</infostring>\n <infostring align="left" x="18cm" y= "0.5cm" size="10" font="Helvetica" color="(0,0,0)" >Page %(page)s</infostring>\n </static>\n -\n <frame id="content"\n nextid="content"\n x="1cm"\n @@ -183,7 +202,6 @@ toppadding="0cm"\n bottompadding="0cm"\n showBoundary="0"/>\n -\n </pagetemplate>\n \n </template>\n diff --git a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml index 754a7fbd47e8f24e9eb2f7a81d6127600d3b5735..ed778741cc7f8faed376904034dfde5b5d49fc62 100644 --- a/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml +++ b/bt5/erp5_pdf_style/SkinTemplateItem/portal_skins/erp5_pdf_style/report_view.xml @@ -58,7 +58,8 @@ <document filename="erp5_list.pdf"\n xmlns:tal="http://xml.zope.org/namespaces/tal"\n xmlns:metal="http://xml.zope.org/namespaces/metal"\n - tal:define="global frame_width python:19"\n + tal:define="landscape python: int(request.get(\'landscape\', 0) or 0);\n + global frame_width python:landscape and 25.8 or 19"\n metal:define-macro="master">\n <title>List Print</title>\n <author>ERP5</author>\n diff --git a/bt5/erp5_pdf_style/bt/revision b/bt5/erp5_pdf_style/bt/revision index b39356075901abfb43d27aef2ae5b76b6aee19c4..410b14d2ce6f958c13adcb30807e8673074c49d9 100644 --- a/bt5/erp5_pdf_style/bt/revision +++ b/bt5/erp5_pdf_style/bt/revision @@ -1 +1 @@ -23 \ No newline at end of file +25 \ No newline at end of file