Commit cebaa641 authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: move files to common folder

parent 51a90517
......@@ -3,6 +3,29 @@
Export WebPage as Report
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# batch_mode: used for tests
#
# document_version: use as document version
# document_language: use as document version
# document_reference: use as document reference
# document_title use as document title
# override_batch_mode used for tests
#
# document_download: download file directly
# document_save: save file in document module
#
# display_header start headers at what level
# display_comment include comments where applicable
# display_detail include details where applicable
# display_depth level of depth to display
#
# report_name report to generate
# report_title report title
# requirement_relative_url XXX sale order has no direct relation to requirement
return context.Base_viewAsReport(
format=format,
document_save=document_save,
......
"""
================================================================================
Return relevant (predecessor) context if Letter is a subobject
================================================================================
"""
# parameters
# ------------------------------------------------------------------------------
# context_url: relative url of the context calling this script
if context_url is not None:
try:
underlying_context = context.restrictedTraverse(context_url)
underlying_portal_type = underlying_context.getPortalType()
if underlying_portal_type == "Letter":
for aggregate in underlying_context.getAggregateValueList() or []:
for predecessor in aggregate.getPredecessorValueList() or []:
if predecessor.getRelativeUrl() == context_url:
return aggregate
except:
pass
return context
#setPredecessorValueList([object]) = referenced documents
#setSuccessorValueList([object]) = related documents
#getPredecessor()
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>context_url=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getRelevantContext</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
================================================================================
Create a theme dict for filling templates
=====================================r===========================================
=================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
......@@ -30,8 +30,7 @@ theme = (
)
if theme is not None:
theme = theme.lower()
#theme_logo_prefix = context.Base_getCustomTemplateParameter("default_logo_prefix")
theme_logo_prefix = "NXD-Template.Logo."
theme_logo_prefix = context.Base_getCustomTemplateParameter("default_logo_prefix")
if theme_logo_prefix:
theme_reference = theme_logo_prefix + theme.capitalize()
theme_logo_list = context.Base_getCustomTemplateProxyParameter("logo", theme_reference)
......@@ -43,7 +42,6 @@ if theme is None:
theme_dict = {}
theme_dict["theme"] = theme
theme_dict["theme_logo_description"] = theme_logo_dict.get("description", blank)
# XXX this one is hard to get in test environment
theme_dict["theme_logo_url"] = context.Base_getCustomTemplateParameter("fallback_image")
if theme_logo_dict.get("relative_url", None) is not None:
theme_dict["theme_logo_url"] = theme_logo_dict.get("relative_url") + param
......
......@@ -3,6 +3,29 @@
Export WebPage as Report
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# batch_mode: used for tests
#
# document_version: use as document version
# document_language: use as document version
# document_reference: use as document reference
# document_title use as document title
# override_batch_mode used for tests
#
# document_download: download file directly
# document_save: save file in document module
#
# display_header start headers at what level
# display_comment include comments where applicable
# display_detail include details where applicable
# display_depth level of depth to display
#
# report_name report to generate
# report_title report title
# requirement_relative_url XXX sale order has no direct relation to requirement
return context.Base_viewAsReport(
format=format,
document_save=document_save,
......@@ -10,11 +33,13 @@ return context.Base_viewAsReport(
document_language=document_language,
document_reference=document_reference,
document_version=document_version,
document_title=document_title,
display_depth=display_depth,
display_detail=display_detail,
display_comment=display_comment,
display_header=display_header,
report_name=report_name,
report_title=report_title,
requirement_relative_url=requirement_relative_url,
batch_mode=batch_mode,
**kw
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>format=\'pdf\', batch_mode=None, requirement_relative_url=None, document_save=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_header=None, display_detail=None, display_comment=None, display_depth=None, report_name=None, *args,**kw</string> </value>
<value> <string>format=\'pdf\', batch_mode=None, requirement_relative_url=None, document_save=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_header=None, display_detail=None, display_comment=None, document_title=None, display_depth=None, report_title=None, report_name=None, *args,**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -12,7 +12,7 @@ Add image size conversion only if image is not the default image
# XXX Note, this is necessary, because it seems images scored in skin folders
# cannot convert (neither format nor size) and in wkhtmltopdf fail if a
# conversion parameter is provided.
if path.find("common") > -1:
if path.find("template_images") > -1:
return path
else:
return path + "&display=%s" % (display or "thumbnail")
return path + ("&" if path.find("?") > -1 else "?") + "display=%s" % (display or "thumbnail")
......@@ -3,6 +3,31 @@
Update a book report dialog with parameters manually entered
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# cancel_url: url to cancel dialog
# dialog_id: id of current_dialog
# portal_skin: portal_skin used
#
# document_version: use as document version
# document_language: use as document version
# document_reference: use as document reference
# document_title use as document title
# override_batch_mode used for tests
#
# document_download: download file directly
# document_save: save file in document module
#
# display_header start headers at what level
# display_comment include comments where applicable
# display_detail include details where applicable
# display_depth level of depth to display
#
# report_name report to generate
# report_title report title
# requirement_relative_url XXX sale order has no direct relation to requirement
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
......
......@@ -97,7 +97,7 @@ if doc_reference is blank:
doc_full_reference = '-'.join([doc_reference, doc_version, doc_language])
# ------------------------------- Theme ----------------------------------------
doc_theme = doc.Base_getThemeDict(format=doc_format, css_path="book_css/book")
doc_theme = doc.Base_getThemeDict(format=doc_format, css_path="template_css/book")
# --------------------------- Source/Destination -------------------------------
doc_source = doc.Base_getSourceDict(
......
......@@ -79,6 +79,7 @@ Creates the Letter footer section.
<b i18n:translate="" i18n:domain="erp5_ui">Tel</b><b>:</b> <b tal:content="python: letter_source_phone"></b>
</span>
</p>
</div>
</tal:block>
</tal:block>
......
......@@ -82,7 +82,7 @@ Generates the letter header
<tr>
<td></td>
<td class="ci-letter-page">
<span i18n:translate="" i18n:domain="erp5_ui">Page</span><span><span class="page"></span><span>/</span><span class="topage"></span><span>
<span i18n:translate="" i18n:domain="erp5_ui">Page</span><span><span class="page"></span><span>/</span><span class="topage"></span></span>
</td>
<td></td>
</tr>
......
......@@ -3,6 +3,26 @@
Print letter in any of the supported formats
================================================================================
"""
# parameters (*default)
# ------------------------------------------------------------------------------
# REQUEST: request object
# format: output format
# portal_skin: skin to use for output
# batch_mode: used for tests
# display_source_address display source (!) adress in adress field or not*
# display_svg display images in svg or png*
# display_head display letter adress head (1)* or not (0)
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# override_source_organisation_title: override event sender career subordinate
# override_source_person_title: override event sender title
# override_destination_organisation_title: override event recipient subordinate
# override_destination_person_title: overide event recipient
# override_date to use instead of current date
new_skin_name = "Letter"
context.getPortalObject().portal_skins.changeSkin(new_skin_name)
if REQUEST is None:
......
......@@ -98,7 +98,7 @@ if letter_reference is None:
letter_full_reference = '-'.join([letter_reference, letter_version, letter_language])
# --------------------------- Layout Parameters --------------------------------
letter_theme = letter.Base_getThemeDict(format=letter_format, css_path="letter_css/letter")
letter_theme = letter.Base_getThemeDict(format=letter_format, css_path="template_css/letter")
# --------------------------- Source/Destination -------------------------------
letter_source = letter.Base_getSourceDict(
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>content</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>document_title</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Letter_viewPreview</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>WebPage_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Letter Preview</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -17,8 +17,7 @@ Generate leaflet legalese
leaflet_year python: options.get('leaflet_year');
leaflet_recycle_url python: options.get('leaflet_recycle_url');">
<div id="legalese">
<p class="top"><span>&copy;</span><span tal:content="python: ''.join([leaflet_organisation, ' ', leaflet_year])"></span>
</p>
<p class="top"><span>&copy;</span><span tal:content="python: ''.join([leaflet_organisation, ' ', leaflet_year])"></span></p>
<p>
<span tal:content="python: leaflet_organisation"></span><br />
<span tal:content="python: leaflet_address"></span><br />
......
......@@ -30,10 +30,10 @@ Generates the complete slideshow
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<tal:block tal:condition="python: doc_format == 'html'">
<link rel="stylesheet" tal:attributes="href python: 'slide_css/reveal.custom.css'" />
<link rel="stylesheet" tal:attributes="href python: 'template_css/reveal.custom.css'" />
</tal:block>
<link rel="stylesheet" href="slide_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="slide_css/zenburn.css" />
<link rel="stylesheet" href="template_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" tal:attributes="href doc_theme_css_url" />
<link rel="stylesheet" tal:attributes="href doc_template_css_url" />
<style type="text/css" tal:content="structure doc_css"></style>
......@@ -59,8 +59,8 @@ Generates the complete slideshow
<tal:block metal:use-macro="context/WebPage_createSlideshowContent/macros/slide_content" />
</div>
</div>
<script src="slide_js/head.min.js"></script>
<script src="slide_js/reveal.custom.js"></script>
<script src="template_js/head.min.js"></script>
<script src="template_js/reveal.custom.js"></script>
<script>
Reveal.initialize({
width: 1280,
......@@ -75,9 +75,9 @@ Generates the complete slideshow
// Dispatches all reveal.js events to the parent window through postMessage
postMessageEvents: false,
dependencies: [
{ src: 'slide_js/classList.min.js', condition: function() { return !document.body.classList; } },
{ src: 'slide_js/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'slide_js/zoom.js', async: true }
{ src: 'template_js/classList.min.js', condition: function() { return !document.body.classList; } },
{ src: 'template_js/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'template_js/zoom.js', async: true }
]
});
Reveal.configure({ slideNumber: 'c / t' });
......
......@@ -23,10 +23,10 @@ Creates the Slideshow content section.
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<tal:block tal:condition="python: doc_format == 'html'">
<link rel="stylesheet" tal:attributes="href python: 'slide_css/reveal.custom.css'" />
<link rel="stylesheet" tal:attributes="href python: 'template_css/reveal.custom.css'" />
</tal:block>
<link rel="stylesheet" href="slide_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="slide_css/zenburn.css" />
<link rel="stylesheet" href="template_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" tal:attributes="href doc_theme_css_url" />
<link rel="stylesheet" tal:attributes="href doc_template_css_url" />
</head>
......
......@@ -23,10 +23,10 @@ Creates the Slideshow cover section.
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<tal:block tal:condition="python: doc_format == 'html'">
<link rel="stylesheet" tal:attributes="href python: 'slide_css/reveal.custom.css'" />
<link rel="stylesheet" tal:attributes="href python: 'template_css/reveal.custom.css'" />
</tal:block>
<link rel="stylesheet" href="slide_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="slide_css/zenburn.css" />
<link rel="stylesheet" href="template_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" tal:attributes="href doc_theme_css_url" />
<link rel="stylesheet" tal:attributes="href doc_template_css_url" />
<style type="text/css" tal:content="doc_css"></style>
......
......@@ -29,10 +29,10 @@ Creates the Slideshow footer section.
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<tal:block tal:condition="python: doc_format == 'html'">
<link rel="stylesheet" tal:attributes="href python: 'slide_css/reveal.custom.css'" />
<link rel="stylesheet" tal:attributes="href python: 'template_css/reveal.custom.css'" />
</tal:block>
<link rel="stylesheet" href="slide_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="slide_css/zenburn.css" />
<link rel="stylesheet" href="template_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" tal:attributes="href python: doc_theme_css_url" />
<link rel="stylesheet" tal:attributes="href python: doc_template_css_url" />
<style type="text/css" tal:content="structure doc_css"></style>
......
......@@ -23,10 +23,10 @@ Creates the Slideshow note section.
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<tal:block tal:condition="python: doc_format == 'html'">
<link rel="stylesheet" tal:attributes="href python: 'slide_css/reveal.custom.css'" />
<link rel="stylesheet" tal:attributes="href python: 'template_css/reveal.custom.css'" />
</tal:block>
<link rel="stylesheet" href="slide_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="slide_css/zenburn.css" />
<link rel="stylesheet" href="template_css/white_theme.custom.css" id="theme" />
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" tal:attributes="href doc_theme_css_url" />
<link rel="stylesheet" tal:attributes="href doc_template_css_url" />
</head>
......
......@@ -3,6 +3,30 @@
Export WebPage as Book
================================================================================
"""
# parameters
# ------------------------------------------------------------------------------
# format output (html*, pdf)
# batch_mode used for tests
#
# document_download download file directly (None*)
# document_save save file in document module (None*)
#
# override_source_person_title use instead of the document author
# override_source_organisation_title use as publishing organisation
# override_document_description use as cover page description
# override_document_short_title use as cover page subtitle
# override_document_title use as cover page title
# override_document_version use as document version
# override_document_reference use as document reference
# override_logo_reference use as document header logo
#
# include_content_table include table of content (True*)
# include_history_table include history/authors (XXX not done)
# include_reference_table include table of links/images/tables
# include_linked_content embed content of linked documents
# include_report_content embed content of report documents
#
# display_svg format for svg images (svg, png*)
return context.WebPage_viewAsBook(
override_document_description=override_document_description,
......
......@@ -3,6 +3,20 @@
Export WebPage as Leaflet
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# display_side: display side bar (1)* or not (0)
# display_svg: display images as svg or png*
# batch_mode: used for tests
# override_leaflet_header_title: custom title to use in the leaflet header
# override_source_organisation_title: used instead of follow-up organisation
# override_source_person_title: used instead of contributor
# document_downalod: download file directly
# document_save: save file in document module
return context.WebPage_viewAsLeaflet(
format=format,
display_side=display_side,
......
......@@ -3,6 +3,25 @@
Export this web page as letter in specified format
================================================================================
"""
# parameters (*default)
# ------------------------------------------------------------------------------
# format: output format
# portal_skin: skin to use for output
# batch_mode: used for tests
# display_source_address display source (!) adress in adress field or not*
# display_svg display images in svg or png*
# display_head display letter adress head (1)* or not (0)
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# override_source_organisation_title: override event sender career subordinate
# override_source_person_title: override event sender title
# override_destination_organisation_title: override event recipient subordinate
# override_destination_person_title: overide event recipient
# override_date to use instead of current date
return context.Letter_viewAsLetter(
format=format,
display_head=display_head,
......
......@@ -3,6 +3,20 @@
Export slideshow in any of the supported formats
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# batch_mode: used for tests
# override_source_organisation_title: to use instead of default company
# override_logo_reference: to use instead of default company logo in footer
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# display_note: display slide notes (1) or not (0)*
# display_svg: display svg-images as svg or png*
return context.WebPage_viewAsSlideshow(
format=format,
display_note=display_note,
......
......@@ -8,9 +8,9 @@ Return custom hardcoded parameters
# parameter Parameter to lookup
if parameter == "fallback_image":
return "common_images/fallback.png"
return "template_images/fallback.png"
if parameter == "default_theme_css_url":
return "default_themes/themes.css"
return "template_themes/themes.css"
if parameter == "wkhtmltopdf_rendering_fix":
return """
......
......@@ -3,6 +3,31 @@
Print WebPage as Book
================================================================================
"""
# parameters
# ------------------------------------------------------------------------------
# format output (html*, pdf)
# batch_mode used for tests
#
# document_download download file directly (None*)
# document_save save file in document module (None*)
#
# override_source_person_title use instead of the document author
# override_source_organisation_title use as publishing organisation
# override_document_description use as cover page description
# override_document_short_title use as cover page subtitle
# override_document_title use as cover page title
# override_document_version use as document version
# override_document_reference use as document reference
# override_logo_reference use as document header logo
#
# include_content_table include table of content (True*)
# include_history_table include history/authors (XXX not done)
# include_reference_table include table of links/images/tables
# include_linked_content embed content of linked documents
# include_report_content embed content of report documents
#
# display_svg format for svg images (svg, png*)
return context.WebPage_viewAsBook(
format=format,
override_document_description=override_document_description,
......
......@@ -3,6 +3,20 @@
Print WebPage as Leaflet
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# display_side: display side bar (1)* or not (0)
# display_svg: display images as svg or png*
# batch_mode: used for tests
# override_leaflet_header_title: custom title to use in the leaflet header
# override_source_organisation_title: used instead of follow-up organisation
# override_source_person_title: used instead of contributor
# document_downalod: download file directly
# document_save: save file in document module
return context.WebPage_viewAsLeaflet(
format=format,
display_side=display_side,
......
......@@ -3,6 +3,24 @@
Print letter in any of the supported formats
================================================================================
"""
# parameters (*default)
# ------------------------------------------------------------------------------
# format: output format
# batch_mode: used for tests
# display_source_address display source (!) adress in adress field or not*
# display_svg display images in svg or png*
# display_head display letter adress head (1)* or not (0)
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# override_source_organisation_title: override event sender career subordinate
# override_source_person_title: override event sender title
# override_destination_organisation_title: override event recipient subordinate
# override_destination_person_title: overide event recipient
# override_date to use instead of current date
return context.Letter_viewAsLetter(
format=format,
display_head=display_head,
......
......@@ -3,6 +3,20 @@
Print and download slideshow in PDF format
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# batch_mode: used for tests
# override_source_organisation_title: to use instead of default company
# override_logo_reference: to use instead of default company logo in footer
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# display_note: display slide notes (1) or not (0)*
# display_svg: display svg-images as svg or png*
return context.WebPage_viewAsSlideshow(
format=format,
display_note=display_note,
......
......@@ -3,9 +3,35 @@
Update a book dialog with parameters manually entered
================================================================================
"""
# XXX: url_param_string easily goes over 2000 chars and Base_callDialogMethod
# sets an arbitrary limit for redirects at 2000 chars. Drop unnecessary fields,
# it's just a dialog update
# XXX: url_param_string on this dialog goes easily over 2000 chars and
# Base_callDialogMethod sets an arbitrary limit for redirects at 2000 chars.
# Drop unnecessary fields, it's just a dialog update.
# parameters
# ------------------------------------------------------------------------------
# format output (html*, pdf)
# cancel_url url to revert from dialog
# dialog_id id of current dialog
#
# document_download download file directly (None*)
# document_save save file in document module (None*)
#
# override_source_person_title use instead of the document author
# override_source_organisation_title use as publishing organisation
# override_document_description use as cover page description
# override_document_short_title use as cover page subtitle
# override_document_title use as cover page title
# override_document_version use as document version
# override_document_reference use as document reference
# override_logo_reference use as document header logo
#
# include_content_table include table of content (True*)
# include_history_table include history/authors (XXX not done)
# include_reference_table include table of links/images/tables
# include_linked_content embed content of linked documents
# include_report_content embed content of report documents
#
# display_svg format for svg images (svg, png*)
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
......
......@@ -3,6 +3,22 @@
Update a leaflet dialog with parameters manually entered
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# display_side: display side bar (1)* or not (0)
# display_svg: display images as svg or png*
# cancel_url: url to go back from dialog
# dialog_id: current dialog id
# portal_skin: current skin used
# override_leaflet_header_title: custom title to use in the leaflet header
# override_source_organisation_title: used instead of follow-up organisation
# override_source_person_title: used instead of contributor
# document_downalod: download file directly
# document_save: save file in document module
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
......
......@@ -3,6 +3,27 @@
Update the letter dialog with parameters manually entered
================================================================================
"""
# parameters (*default)
# ------------------------------------------------------------------------------
# REQUEST: request object
# format: output format
# portal_skin: skin to use for output
# cancel_url: url to cancel dialog
# dialog_id: id of current dialog
# display_source_address display source (!) adress in adress field or not*
# display_svg display images in svg or png*
# display_head display letter adress head (1)* or not (0)
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# override_source_organisation_title: override event sender career subordinate
# override_source_person_title: override event sender title
# override_destination_organisation_title: override event recipient subordinate
# override_destination_person_title: overide event recipient
# override_date to use instead of current date
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
......
......@@ -3,6 +3,22 @@
Update the slide dialog with parameters manually entered
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# batch_mode: used for tests
# cancel_url: url to revert from dialog
# dialog_id: id of the current dialog
# override_source_organisation_title: to use instead of default company
# override_logo_reference: to use instead of default company logo in footer
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# display_note: display slide notes (1) or not (0)*
# display_svg: display svg-images as svg or png*
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
......
......@@ -108,7 +108,7 @@ if book_reference is None:
book_full_reference = '-'.join([book_reference, book_version, book_language])
# ------------------------------- Theme ----------------------------------------
book_theme = book.Base_getThemeDict(format=book_format, css_path="book_css/book")
book_theme = book.Base_getThemeDict(format=book_format, css_path="template_css/book")
# --------------------------- Source/Destination -------------------------------
book_source = book.Base_getSourceDict(
......
......@@ -84,14 +84,14 @@ if leaflet_reference is None:
leaflet_full_reference = '-'.join([leaflet_reference, leaflet_version, leaflet_language])
# ---------------------------- Theme Parameters --------------------------------
leaflet_theme = leaflet.Base_getThemeDict(format=leaflet_format, css_path="leaflet_css/leaflet")
leaflet_theme = leaflet.Base_getThemeDict(format=leaflet_format, css_path="template_css/leaflet")
# XXX set leaflet title, but not to theme (used elsewhere, but not on leaflet)
if override_leaflet_header_title is not None:
leaflet_theme["theme_logo_description"] = html_quote(override_leaflet_header_title)
if leaflet_theme.get("theme").lower() == leaflet_theme.get("theme_logo_description").lower():
leaflet_theme["theme_logo_description"] = blank
leaflet_recycle_url = ''.join([leaflet_url, "/leaflet_img/recycle.png?portal_skin=Leaflet"])
leaflet_recycle_url = "template_images/recycle.png"
leaflet_css = ''.join([
'html .ci-leaflet #left-summary:before {',
'background: url("%s") center no-repeat;' % (leaflet_theme.get("enhanced_logo_url")),
......
......@@ -202,7 +202,7 @@ if doc_reference is None:
doc_full_reference = '-'.join([doc_reference, doc_version, doc_language])
# --------------------------- Layout Parameters --------------------------------
doc_theme = doc.Base_getThemeDict(format=doc_format, css_path="slide_css/slide")
doc_theme = doc.Base_getThemeDict(format=doc_format, css_path="template_css/slide")
doc_css = ''.join(['.ci-slideshow-intro.present:not(.slide-background):before {',
'content: "%s";' % (doc_theme.get("theme_logo_description")),
'background: #FFF url("%s") center no-repeat;' % (doc.Base_setUrl(path=doc_theme.get("theme_logo_url"), display="medium")),
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>common_images</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>letter_css</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slide_css</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slide_img</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>slide_js</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>leaflet_img</string> </value>
<value> <string>template_css</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>default_themes</string> </value>
<value> <string>template_images</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>book_css</string> </value>
<value> <string>template_js</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>leaflet_css</string> </value>
<value> <string>template_themes</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -3,6 +3,45 @@
View WebPage as Book or Report
================================================================================
"""
# parameters
# ------------------------------------------------------------------------------
# format output (html*, pdf)
# batch_mode used for tests
# transformation (not done)
#
# include_content_table include table of content (True*)
# include_history_table include history/authors (XXX not done)
# include_reference_table include table of links/images/tables
# include_linked_content embed content of linked documents
# include_report_content embed content of report documents
# document_download download file directly (None*)
# document_save save file in document module (None*)
# document_language language to generate report in
# document_reference reference of document for report
# document_version version of document for report
# document_title document title for report
#
# override_source_person_title use instead of the document author
# override_source_organisation_title use as publishing organisation
# override_document_description use as cover page description
# override_document_short_title use as cover page subtitle
# override_document_title use as cover page title
# override_document_version use as document version
# override_document_reference use as document reference
# override_logo_reference use as document header logo
#
# requirement_relative_url XXX relate sale order to requirement
#
# report_name name of report to call
# report_title title of report
#
# display_depth depth to report (eg sale order lines)
# display_detail show details on report
# display_comment show comments on report
# display_header display report header
# display_svg format for svg images (svg, png*)
if context.REQUEST["portal_skin"] == "Report":
return context.Base_viewAsReport(
format=format,
......
......@@ -3,6 +3,20 @@
View as Leaflet (using portal_skin=Leaflet)
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# display_side: display side bar (1)* or not (0)
# display_svg: display images as svg or png*
# batch_mode: used for tests
# override_leaflet_header_title: custom title to use in the leaflet header
# override_source_organisation_title: used instead of follow-up organisation
# override_source_person_title: used instead of contributor
# document_downalod: download file directly
# document_save: save file in document module
return context.WebPage_viewAsLeaflet(
format=format,
display_side=display_side,
......
......@@ -3,6 +3,20 @@
Display WebPage as slideshow if called with portal_skin=Slide parameter
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# format: output in html*, pdf
# batch_mode: used for tests
# override_source_organisation_title: to use instead of default company
# override_logo_reference: to use instead of default company logo in footer
# document_download: download file directly (default None)
# document_save: save file in document module (default None)
# display_note: display slide notes (1) or not (0)*
# display_svg: display svg-images as svg or png*
return context.WebPage_viewAsSlideshow(
format=format,
display_note=display_note,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment