Commit cdef346a authored by Xiaowu Zhang's avatar Xiaowu Zhang

corporate identity improvement

See merge request nexedi/erp5!1464
parents 0c51b3dd fd2114e1
Pipeline #16639 failed with stage
in 0 seconds
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_exchange</string>
<string>action_type/object_jio_exchange</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_exchange</string> </value>
<value> <string>object_jio_exchange</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_jio_exchange</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_jio_exchange</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Generate a book from the current web page.</string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>export_contract</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>25.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Export as Contract</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/WebPage_viewExportAsContractDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_exchange</string>
<string>action_type/object_jio_exchange</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_exchange</string> </value>
<value> <string>object_jio_exchange</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_exchange</string>
<string>action_type/object_jio_exchange</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_exchange</string> </value>
<value> <string>object_jio_exchange</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_exchange</string>
<string>action_type/object_jio_exchange</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_exchange</string> </value>
<value> <string>object_jio_exchange</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -16,13 +16,13 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_exchange</string>
<string>action_type/object_jio_exchange</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_exchange</string> </value>
<value> <string>object_jio_exchange</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
......
......@@ -42,7 +42,7 @@ of the document. So, this link external link <a href="https://google.com">docume
will not be touched, while this one will end up as a reference [<a href="https://www.google.com/" title="Google Website;Search;0;1">AD</a>]
and this internl link (only reference) will be embedded if the option is active:
</p>
<a href="Template.Test.Book.Embeddable.Document">This link should be embedded</a>
<a>This link should be embedded</a>
<p>Embedded document above.</p>
<h2>Table Caption/Image Captions</h2>
......@@ -98,7 +98,7 @@ alt attribute, to list them in the reference tables. Examples of both:
<p>Please don't add any formatting to a table except for the width of cells. There
is a default css applied to all tables. Finally an image:
</p>
<img src="Template.Test.Image.Office?format=png&amp;display=medium" type="image/png" alt="Caption for this image" />
<img type="image/png" alt="Caption for this image" />
<h1>Reports</h1>
......
......@@ -37,7 +37,7 @@
</p>
<h2>Ubiquitous HTML5 Appstore</h2>
<div class="left-icon"> <img alt="" src="Template.Test.Image.Screenshot.Erp5?format=png" />
<div class="left-icon"> <img alt="" />
<p class="excerpt">Foo HTML5 Appstore</p>
</div>
<p>
......@@ -59,7 +59,7 @@
</p>
<h2>Never lose your data</h2>
<div class="left-icon"> <img alt="" src="Template.Test.Image.Screenshot.Erp5?format=png" />
<div class="left-icon"> <img alt="" />
<p class="excerpt">Foo supports new generation low cost Baz such as Snip 1234</p>
</div>
<p>
......
......@@ -5,7 +5,7 @@
<p>The hardware offering relies on building blocks of 180 dual Xeon servers. Each subsystem integrates 2880 x86 core, 11.5 TB of main memory and 180 TB of high performance, full SSD storage. Networking relies on redundant industry standard 10 Gbps Ethernet. Each building block is coming at a price of 205,000 Euros and is ready to scale to hundred thousands of cores.</p>
<p style="text-align:center">
<img src="Template.Test.Image.Map?format=png" alt="" />
<img alt="" />
</p>
<p>The software offering relies on Bar Open Source / Free Software. Bar integrates IaaS (virtualisation, nano-containers), PaaS, software defined networking, accounting, billing, provisionning, orchestration, automated disaster recovery, network resiliency and edge computing. Typical Bar monthly operating cost per building block is 4800 euro.</p>
......
......@@ -36,7 +36,7 @@
<section>
<h1>Content Header</h1>
<img src="Template.Test.Image.Screenshot.Erp5?format=png" alt="Fullsize Screenshot">
<img alt="Fullsize Screenshot">
<details open="open">
Additional information provided here.
</details>
......@@ -44,7 +44,7 @@
<section>
<h1>Content Header</h1>
<img src="Template.Test.Image.Screenshot.Erp5?format=png" alt="Fullsize Screenshot">
<img alt="Fullsize Screenshot">
<p>Screenshot info</p>
<details open="open">
Additional information provided here.
......
......@@ -3,6 +3,10 @@
<skin_folder>erp5_corporate_identity_book</skin_folder>
<skin_selection>Book,Report</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_corporate_identity_contract</skin_folder>
<skin_selection>Contract</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_corporate_identity_leaflet</skin_folder>
<skin_selection>Leaflet</skin_selection>
......@@ -25,6 +29,6 @@
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_xhtml_style</skin_folder>
<skin_selection>Book,CI_web,Leaflet,Letter,Release,Report,Slide</skin_selection>
<skin_selection>Book,CI_web,Contract,Leaflet,Letter,Release,Report,Slide</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
......@@ -39,6 +39,8 @@ if doc_save:
'portal_type': context.getTranslatedPortalType()
}
)
if context.getWebSiteValue():
context.getPortalObject().portal_skins.changeSkin('HalRestricted')
return web_page.Base_redirect(
keep_items=dict(portal_status_message=message)
)
......
......@@ -39,7 +39,7 @@ Update a book report dialog with parameters manually entered
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
return context.Base_renderForm(
dialog_id,
keep_items = dict(
portal_status_message=translateString('Preview updated.'),
......
......@@ -37,6 +37,7 @@ Generates the complete book (only called in HTML version)
book_full_reference python: options.get('book_full_reference');
book_source_organisation_title python: options.get('book_source_organisation_title');
margin_15mm python: options.get('margin_15mm');
book_history_section_list python: options.get('book_history_section_list');
book_table_of_content python: options.get('book_table_of_content');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', book_theme, ' ci-', book_language])">
......@@ -75,7 +76,7 @@ Generates the complete book (only called in HTML version)
<tal:block tal:condition="python: book_raw_report != True">
<tal:block metal:use-macro="context/WebPage_createBookCover/macros/book_cover" />
</tal:block>
<tal:block tal:condition="python: book_include_history is not None">
<tal:block tal:condition="python: book_include_history">
<tal:block metal:use-macro="context/WebPage_createBookTableOfHistory/macros/book_history" />
</tal:block>
<tal:block tal:replace="structure book_table_of_content"></tal:block>
......@@ -99,7 +100,7 @@ Generates the complete book (only called in HTML version)
<tal:block tal:condition="python: book_raw_report != True">
<tal:block metal:use-macro="context/WebPage_createBookCover/macros/book_cover" />
</tal:block>
<tal:block tal:condition="python: book_include_history is not None">
<tal:block tal:condition="python: book_include_history">
<tal:block metal:use-macro="context/WebPage_createBookTableOfHistory/macros/book_history" />
</tal:block>
<tal:block tal:replace="structure book_table_of_content"></tal:block>
......
......@@ -15,6 +15,7 @@ Creates the Book sections (version, authors, etc).
book_signature_list python: options.get('book_signature_list');
book_distribution_list python: options.get('book_distribution_list');
margin_15mm python: options.get('margin_15mm');
book_history_section_list python: options.get('book_history_section_list');
book_version_list python: options.get('book_version_list');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', book_theme, ' ci-', book_language])">
......@@ -43,7 +44,10 @@ Creates the Book sections (version, authors, etc).
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="book_history">
<tal:comment replace="nothing">Directly called from WebPage_createBook, so need to check again</tal:comment>
<tal:block tal:repeat="book_history_section book_history_section_list">
<tal:block tal:replace="structure book_history_section"></tal:block>
</tal:block>
<!--tal:comment replace="nothing">Directly called from WebPage_createBook, so need to check again</tal:comment>
<tal:block tal:condition="python: book_include_history != 0">
<section>
<table class="ci-book-table ci-book-signature-list" border="1" width="100%" cellpadding="0" cellspacing="0">
......@@ -162,6 +166,6 @@ Creates the Book sections (version, authors, etc).
</tbody>
</table>
</section>
</tal:block>
</tal:block-->
</tal:block>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContract</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:comment replace="nothing">
"""
================================================================================
Generates the complete contract (only called in HTML version)
================================================================================
"""
</tal:comment>
<tal:block tal:define="contract_raw_tables python: options.get('contract_raw_tables');
contract_raw_report python: options.get('contract_raw_report');
contract_theme python: options.get('contract_theme');
contract_header python: options.get('contract_header');
contract_footer python: options.get('contract_footer');
contract_title python: options.get('contract_title');
contract_language python: options.get('contract_language');
contract_theme_css_font_list python: options.get('contract_theme_css_font_list');
contract_theme_css_url python: options.get('contract_theme_css_url');
contract_template_css_url python: options.get('contract_template_css_url');
contract_report_css_list python: options.get('contract_report_css_list');
contract_report_js_list python: options.get('contract_report_js_list');
contract_embed python: options.get('contract_embed');
contract_short_title python: options.get('contract_short_title');
contract_description python: options.get('contract_description');
contract_source_person_title python: options.get('contract_source_person_title');
contract_include_history python: options.get('contract_include_history');
contract_signature_list python: options.get('contract_signature_list');
contract_version_list python: options.get('contract_version_list');
contract_distribution_list python: options.get('contract_distribution_list');
contract_content python: options.get('contract_content');
contract_format python: options.get('contract_format');
contract_rendering_fix python: options.get('contract_rendering_fix');
contract_logo_url python: options.get('contract_logo_url');
contract_logo_title python: options.get('contract_logo_title');
contract_reference python: options.get('contract_reference');
contract_revision python: options.get('contract_revision');
contract_version python: options.get('contract_version');
contract_short_date python: options.get('contract_short_date');
contract_full_reference python: options.get('contract_full_reference');
contract_source_organisation_title python: options.get('contract_source_organisation_title');
contract_history_section_list python: options.get('contract_history_section_list');
contract_table_of_content python: options.get('contract_table_of_content');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', contract_theme, ' ci-', contract_language])">
<head>
<meta charset="utf-8">
<title tal:content="python: contract_title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<tal:block tal:repeat="font_url contract_theme_css_font_list">
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<link rel="stylesheet" tal:attributes="href contract_theme_css_url" />
<link rel="stylesheet" tal:attributes="href contract_template_css_url" />
<link rel="stylesheet" href="template_css/highlight.css" />
<tal:block tal:condition="python: len(contract_report_css_list) > 0">
<tal:block tal:repeat="css_href contract_report_css_list">
<link rel="stylesheet" tal:attributes="href css_href" />
</tal:block>
</tal:block>
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
var x=window.location.search.substring(1).split('&');
for (var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
for (var i in x) {
var y = document.getElementsByClassName(x[i]);
for (var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
}
}
</script>
</head>
<body class="ci-contract" onload="setPlaceholdersWithUrlParameters()">
<tal:block tal:condition="python: contract_embed != 1">
<tal:block metal:use-macro="context/WebPage_createContractHeader/macros/contract_header" />
<tal:block tal:condition="python: contract_raw_report != True">
<tal:block metal:use-macro="context/WebPage_createContractCover/macros/contract_cover" />
</tal:block>
<tal:block tal:condition="python: contract_include_history">
<tal:block metal:use-macro="context/WebPage_createContractTableOfHistory/macros/contract_history" />
</tal:block>
<tal:block tal:replace="structure contract_table_of_content"></tal:block>
</tal:block>
<tal:block metal:use-macro="context/WebPage_createContractContent/macros/contract_content" />
<tal:block tal:condition="python: contract_embed != 1">
<tal:block metal:use-macro="context/WebPage_createContractFooter/macros/contract_footer" />
</tal:block>
<script type="text/javascript" src="template_js/highlight.js"></script>
<tal:block tal:condition="python: len(contract_report_js_list) > 0">
<tal:block tal:repeat="js_src contract_report_js_list">
<script type="text/javascript" tal:attributes="src js_src"></script>
</tal:block>
</tal:block>
</body>
</html>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContractContent</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:comment replace="nothing">
"""
================================================================================
Creates the Book content.
================================================================================
"""
</tal:comment>
<tal:block tal:define="contract_theme python: options.get('contract_theme');
contract_title python: options.get('contract_title');
contract_language python: options.get('contract_language');
contract_theme_css_font_list python: options.get('contract_theme_css_font_list');
contract_theme_css_url python: options.get('contract_theme_css_url');
contract_template_css_url python: options.get('contract_template_css_url');
contract_report_css_list python: options.get('contract_report_css_list');
contract_report_js_list python: options.get('contract_report_js_list');
contract_short_title python: options.get('contract_short_title');
contract_description python: options.get('contract_description');
contract_source_person_title python: options.get('contract_source_person_title');
contract_content python: options.get('contract_content');
contract_format python: options.get('contract_format');
contract_rendering_fix python: options.get('contract_rendering_fix');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', contract_theme, ' ci-', contract_language])">
<head>
<meta charset="utf-8">
<title tal:content="python: contract_title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<tal:block tal:repeat="font_url contract_theme_css_font_list">
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<link rel="stylesheet" tal:attributes="href contract_theme_css_url" />
<link rel="stylesheet" tal:attributes="href contract_template_css_url" />
<link rel="stylesheet" href="template_css/highlight.css" />
<tal:block tal:condition="python: len(contract_report_css_list) > 0">
<tal:block tal:repeat="css_href contract_report_css_list">
<link rel="stylesheet" tal:attributes="href css_href" />
</tal:block>
</tal:block>
</head>
<body class="ci-contract ci-contract-content">
<tal:block metal:use-macro="context/WebPage_createContractContent/macros/contract_content" />
<script type="text/javascript" src="template_js/highlight.js"></script>
<tal:block tal:condition="python: len(contract_report_js_list) > 0">
<tal:block tal:repeat="js_src contract_report_js_list">
<script type="text/javascript" tal:attributes="src js_src"></script>
</tal:block>
</tal:block>
<tal:block tal:condition="python: contract_format == 'pdf'">
<tal:block tal:content="structure python: contract_rendering_fix"></tal:block>
</tal:block>
</body>
</html>
</tal:block>
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="contract_content">
<tal:block tal:content="structure python: contract_content"></tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContractCover</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:comment replace="nothing">
"""
================================================================================
Creates the Contract cover.
================================================================================
"""
</tal:comment>
<tal:block tal:define="contract_theme python: options.get('contract_theme');
contract_title python: options.get('contract_title');
contract_language python: options.get('contract_language');
contract_theme_css_font_list python: options.get('contract_theme_css_font_list');
contract_theme_css_url python: options.get('contract_theme_css_url');
contract_template_css_url python: options.get('contract_template_css_url');
contract_short_title python: options.get('contract_short_title');
contract_description python: options.get('contract_description');
contract_source_person_title python: options.get('contract_source_person_title');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', contract_theme, ' ci-', contract_language])">
<head>
<meta charset="utf-8">
<title tal:content="python: contract_title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<tal:block tal:repeat="font_url contract_theme_css_font_list">
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<link rel="stylesheet" tal:attributes="href contract_theme_css_url" />
<link rel="stylesheet" tal:attributes="href contract_template_css_url" />
</head>
<body class="ci-contract">
<tal:block metal:use-macro="context/WebPage_createContractCover/macros/contract_cover" />
</body>
</html>
</tal:block>
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="contract_cover">
<div class="ci-contract-cover ci-document-cover ci-document-print">
<p class="ci-contract-cover-faux-h1" tal:content="python: contract_title"></p>
<p class="ci-contract-cover-faux-h2" tal:content="python: contract_short_title"></p>
<p class="ci-contract-cover-description" tal:content="python: contract_description"></p>
<p class="ci-contract-cover-author-list">
<tal:block tal:repeat="author contract_source_person_title">
<span tal:content="author"></span><tal:block tal:condition="not: repeat/author/end">,</tal:block>
</tal:block>
</p>
</div>
</tal:block>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContractFooter</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:comment replace="nothing">
"""
================================================================================
Creates the Contract footer.
================================================================================
"""
</tal:comment>
<tal:block tal:define="contract_theme python: options.get('contract_theme');
contract_title python: options.get('contract_title');
contract_footer python: options.get('contract_footer');
contract_language python: options.get('contract_language');
contract_theme_css_font_list python: options.get('contract_theme_css_font_list');
contract_theme_css_url python: options.get('contract_theme_css_url');
contract_template_css_url python: options.get('contract_template_css_url');
contract_full_reference python: options.get('contract_full_reference');
contract_source_organisation_title python: options.get('contract_source_organisation_title');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', contract_theme, ' ci-', contract_language])">
<head>
<meta charset="utf-8">
<title tal:content="python: contract_title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<tal:block tal:repeat="font_url contract_theme_css_font_list">
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<link rel="stylesheet" tal:attributes="href contract_theme_css_url" />
<link rel="stylesheet" tal:attributes="href contract_template_css_url" />
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
var x=window.location.search.substring(1).split('&');
for (var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
for (var i in x) {
var y = document.getElementsByClassName(x[i]);
for (var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
}
}
</script>
</head>
<body class="ci-contract" onload="setPlaceholdersWithUrlParameters()">
<tal:block metal:use-macro="context/WebPage_createContractFooter/macros/contract_footer" />
</body>
</html>
</tal:block>
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="contract_footer">
<tal:block tal:condition="python: contract_footer">
<tal:block tal:content="structure python: contract_footer"></tal:block>
</tal:block>
<tal:block tal:condition="python: not contract_footer">
<table class="ci-contract-footer">
<tbody>
<tr>
<td></td>
<td></td>
<td><div>
<span class="ci-contract-header-key" i18n:translate="" i18n:domain="erp5_ui">Page:</span>
<span class="ci-contract-header-value page"></span>
<span class="ci-contract-header-value">/</span>
<span class="ci-contract-header-value topage"></span>
</div></td>
</tr>
</tbody>
</table>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContractHeader</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:comment replace="nothing">
"""
================================================================================
Creates the Contract header.
================================================================================
"""
</tal:comment>
<tal:block tal:define="contract_theme python: options.get('contract_theme');
contract_title python: options.get('contract_title');
contract_header python: options.get('contract_header');
contract_language python: options.get('contract_language');
contract_theme_css_font_list python: options.get('contract_theme_css_font_list');
contract_theme_css_url python: options.get('contract_theme_css_url');
contract_template_css_url python: options.get('contract_template_css_url');
contract_logo_url python: options.get('contract_logo_url');
contract_logo_title python: options.get('contract_logo_title');
contract_short_title python: options.get('contract_short_title');
contract_reference python: options.get('contract_reference');
contract_revision python: options.get('contract_revision');
contract_version python: options.get('contract_version');
contract_short_date python: options.get('contract_short_date');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', contract_theme, ' ci-', contract_language])">
<head>
<meta charset="utf-8">
<title tal:content="python: contract_title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<tal:block tal:repeat="font_url contract_theme_css_font_list">
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<link rel="stylesheet" tal:attributes="href contract_theme_css_url" />
<link rel="stylesheet" tal:attributes="href contract_template_css_url" />
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
var x=window.location.search.substring(1).split('&');
for (var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
for (var i in x) {
var y = document.getElementsByClassName(x[i]);
for (var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
}
}
function setImageSize(pic) {
if (pic.naturalWidth / pic.naturalHeight <= 1) {
pic.style.width = "auto";
pic.style.maxWidth = "28mm";
pic.style.maxHeight = "28mm"
pic.style.height = "auto";
}
}
</script>
</head>
<body class="ci-contract" onload="setPlaceholdersWithUrlParameters()">
<tal:block metal:use-macro="context/WebPage_createContractHeader/macros/contract_header" />
</body>
</html>
</tal:block>
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="contract_header">
<tal:block tal:condition="python: contract_header">
<tal:block tal:content="structure python: contract_header"></tal:block>
</tal:block>
<tal:block tal:condition="python: not contract_header">
<table class="ci-contract-header">
<tbody>
<tr>
<td>
</td>
<td>
</td>
<td>
<div class="ci-contract-header-image-wkhtmltopdf-image-wrapper">
<img class="hack" onload="setImageSize(event.srcElement)" tal:attributes="src python: contract_logo_url; alt python: contract_logo_title"/>
</div>
</td>
</tr>
</tbody>
</table>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContractTableOfHistory</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:comment replace="nothing">
"""
================================================================================
Creates the Contract sections (version, authors, etc).
================================================================================
"""
</tal:comment>
<tal:block tal:define="contract_theme python: options.get('contract_theme');
contract_title python: options.get('contract_title');
contract_language python: options.get('contract_language');
contract_theme_css_font_list python: options.get('contract_theme_css_font_list');
contract_theme_css_url python: options.get('contract_theme_css_url');
contract_template_css_url python: options.get('contract_template_css_url');
contract_include_history python: options.get('contract_include_history');
contract_history_section_list python: options.get('contract_history_section_list');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', contract_theme, ' ci-', contract_language])">
<head>
<meta charset="utf-8">
<title tal:content="python: contract_title"></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<tal:block tal:repeat="font_url contract_theme_css_font_list">
<link rel="stylesheet" tal:attributes="href font_url" />
</tal:block>
<link rel="stylesheet" tal:attributes="href contract_theme_css_url" />
<link rel="stylesheet" tal:attributes="href contract_template_css_url" />
</head>
<body class="ci-contract" tal:condition="python: contract_include_history != 0">
<tal:block metal:use-macro="context/WebPage_createContractTableOfHistory/macros/contract_history" />
</body>
</html>
</tal:block>
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="contract_history">
<tal:block tal:repeat="contract_history_section contract_history_section_list">
<tal:block tal:replace="structure contract_history_section"></tal:block>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContractTableOfReferences</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</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>
<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>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_createContractXslTableOfContent</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:outline="http://wkhtmltopdf.org/outline"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat"/>
<xsl:template match="outline:outline">
<xsl:param name="count" select="0" />
<html>
<head>
<title>Table of Contents</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* punt at fixing overlaps */
html, body {
overflow-x: initial !important;
}
/* font */
.ci-contract-table-of-content ol,
.ci-contract-table-of-content li,
.ci-contract-table-of-content a,
.ci-contract-table-of-content span {
font-family: "Roboto", Arial, 'Noto Sans Sc', SimHei, STXihei, sans-serif;
}
.ci-contract-faux-h1 {
font-family: "Roboto", Arial, 'Noto Sans Sc', SimHei, STXihei, sans-serif;
}
/* size */
.ci-contract-table-of-content ol {
font-size: 20px;
}
.ci-contract-table-of-content ol ol {
font-size: 18px;
}
.ci-contract-faux-h1 {
font-size: 36px;
}
/* indent */
/* h1 */
.ci-contract-table-of-content ol {
text-indent: 0;
}
/* h2 */
.ci-contract-table-of-content ol ol {
text-indent: 3em;
}
/* h3 */
.ci-contract-table-of-content ol ol ol {
text-indent: 6em;
}
/* h4 */
.ci-contract-table-of-content ol ol ol ol {
text-indent: 9em;
}
/* h5 */
.ci-contract-table-of-content ol ol ol ol ol {
text-indent: 12em;
}
/* h6 */
.ci-contract-table-of-content ol ol ol ol ol ol {
text-indent: 15em;
}
/* spacing, what misery */
.ci-contract-helper {
margin: 0;
padding: 0;
}
.ci-contract-table-of-content-lead-item:not(:first-child) {
padding-top: 10mm;
}
/* dotted lines */
.ci-contract-table-of-content ol li div {
position: relative;
overflow: hidden;
}
.ci-contract-table-of-content ol li div:after {
content: "";
position: absolute;
bottom: 3px;
width: 100%;
border-bottom: 1px dotted #000;
z-index: 500;
}
/* line-height */
.ci-contract-table-of-content ol li div {
height: 28px;
line-height: 24px;
}
.ci-contract-table-of-content ol ol li div {
height: 24px;
line-height: 20px;
}
/* numbering x.x.x.x */
.ci-contract-table-of-content ol li {
counter-increment: item;
}
.ci-contract-table-of-content ol li div:before {
content: counters(item, ".") ". ";
padding-right: 0.5em;
}
.ci-contract-table-of-content li ol li div:before {
content: counters(item, ".") " ";
}
/* general styling */
.ci-contract-table-of-content {
display: block;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding-right: 10px;
}
.ci-contract-table-of-content ol {
counter-reset: item;
list-style-type: none;
margin: 0;
padding: 0;
display: block;
width: inherit;
}
.ci-contract-table-of-content li ol li {
margin: 0;
}
/* page numbers */
.ci-contract-table-of-content span {
float: right;
position: relative;
}
/* hail mary coverup */
.ci-contract-table-of-content span:before {
content: "";
height: 4px;
width: 22px;
position: absolute;
background-color: #fff;
bottom: -4px;
right: -1px;
z-index: 1000;
}
.ci-contract-table-of-content a {
text-decoration:none;
color: black;
}
.ci-contract-faux-h1 {
text-align: left;
font-weight: normal;
margin-top: 24mm;
margin-bottom: 12%;
}
</style>
</head>
<body class="ci-contract-toc">
<p class="ci-contract-faux-h1" tal:content="python: options.get('contract_toc_title') or ''">Table of Contents</p>
<div class="ci-contract-table-of-content">
<p class="ci-contract-helper"></p>
<ol>
<xsl:apply-templates select="outline:item/outline:item">
<xsl:with-param name="count" select="$count" />
</xsl:apply-templates>
</ol>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="outline:item">
<xsl:param name="count" />
<xsl:choose>
<xsl:when test="number($count)=0">
<li class="ci-contract-table-of-content-lead-item">
<xsl:if test="@title!=''">
<div>
<a>
<xsl:if test="@link">
<xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
</xsl:if>
<xsl:if test="@backLink">
<xsl:attribute name="name"><xsl:value-of select="@backLink"/></xsl:attribute>
</xsl:if>
<xsl:value-of select="@title" />
</a>
<span><xsl:value-of select="@page" /> </span>
</div>
</xsl:if>
<ol>
<xsl:comment>added to prevent self-closing tags in QtXmlPatterns</xsl:comment>
<xsl:apply-templates select="outline:item"></xsl:apply-templates>
</ol>
</li>
</xsl:when>
<xsl:otherwise>
<li>
<xsl:if test="@title!=''">
<div>
<a>
<xsl:if test="@link">
<xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute>
</xsl:if>
<xsl:if test="@backLink">
<xsl:attribute name="name"><xsl:value-of select="@backLink"/></xsl:attribute>
</xsl:if>
<xsl:value-of select="@title" />
</a>
<span><xsl:value-of select="@page" /> </span>
</div>
</xsl:if>
<ol>
<xsl:comment>added to prevent self-closing tags in QtXmlPatterns</xsl:comment>
<xsl:apply-templates select="outline:item"></xsl:apply-templates>
</ol>
</li>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -38,7 +38,7 @@ for figure in re.findall('(<img.*?/>)', document_content or ''):
# no alt attribute = skip an image from being included
figure_title = re.findall(match_content, figure) or blank
if figure_title[0] == blank:
if figure_title == blank or figure_title[0] == blank:
continue
figure_count = figure_count + 1
......
......@@ -3,6 +3,9 @@
Create HTML table of content (to be used on web pages instead of xsl for pdf)
================================================================================
"""
# ERP5 web uses type= argument, which is also a python builtin
# pylint: disable=redefined-builtin
# parameters
# ------------------------------------------------------------------------------
# doc_content text content of document being rendered
......@@ -58,8 +61,8 @@ for header in re.findall("<h[1-6].*?</h[1-6]>", doc_content or blank):
closer = int(header_current) * '</ol>'
insert = ''.join([
'<section class="ci-book-table-of-content">',
'<p class="ci-book-toc-faux-h1">%s</p>' % (doc_toc_title or "Table of Contents"),
'<section class="ci-%s-table-of-content">' % type,
'<p class="ci-%s-toc-faux-h1">%s</p>' % (type, doc_toc_title or "Table of Contents"),
table_of_content,
closer,
'</section>'
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>doc_content=None, doc_reference=None, doc_toc_title=None</string> </value>
<value> <string>doc_content=None, doc_reference=None, doc_toc_title=None, type=\'book\'</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -11,6 +11,7 @@ import re
blank = ""
for link in re.findall('([^[]<a.*?</a>[^]])', doc_content or blank):
link = link[1:-1]
link_reference_list = re.findall('href=\"(.*?)\"', link)
if link_reference_list:
link_reference = link_reference_list[0]
......@@ -21,7 +22,7 @@ for link in re.findall('([^[]<a.*?</a>[^]])', doc_content or blank):
link_doc = context.restrictedTraverse(link_reference.split("?")[0])
doc_content = doc_content.replace(link, link_doc.asStrippedHTML())
except LookupError:
raise LookupError(link_reference)
pass
doc_content = doc_content.replace("${related_subject_list}", blank)
doc_content = doc_content.replace("${table_of_content", blank)
......
......@@ -55,6 +55,7 @@ if doc_content.find('${WebPage_') != -1:
# call it with the parameters provided
for link in re.findall('([^[]<a.*?</a>[^]])', doc_content):
link = link[1:-1]
link_reference_list = re.findall('href=\"(.*?)\"', link)
if link_reference_list:
link_reference = link_reference_list[0]
......
# ERP5 web uses format= argument, which is also a python builtin
# pylint: disable=redefined-builtin
return context.WebPage_viewAsContract(
document_save=document_save,
display_svg=display_svg,
batch_mode=batch_mode,
include_content_table=include_content_table,
include_history_table=include_history_table,
include_reference_table=include_reference_table,
include_linked_content=include_linked_content,
include_report_content=include_report_content,
format=format,
**kw
)
<?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>format=None, include_content_table=None,include_history_table= None,include_reference_table=None,include_linked_content=None,include_report_content=None,batch_mode=False,display_svg=None,document_save=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_exportAsContract</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -53,9 +53,10 @@ if doc_save:
'portal_type': document.getTranslatedPortalType()
}
)
# XXX redirect = true?
return document.Base_redirect(
if context.getWebSiteValue():
context.getPortalObject().portal_skins.changeSkin('HalRestricted')
return document.Base_redirect(form_id='view',
keep_items=dict(portal_status_message=message)
)
#XXX else:
......
......@@ -38,31 +38,27 @@ Update a book dialog with parameters manually entered
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
portal_status_message=translateString('Preview updated.'),
cancel_url=cancel_url,
portal_skin=portal_skin,
format=format,
display_svg=display_svg,
document_save=document_save,
document_download=document_download,
override_document_description=override_document_description,
override_document_short_title=override_document_short_title,
override_document_title=override_document_title,
override_document_version=override_document_version,
override_logo_reference=override_logo_reference,
override_source_person_title=override_source_person_title,
override_document_reference=override_document_reference,
override_source_organisation_title=override_source_organisation_title,
transformation=transformation,
include_content_table=include_content_table,
include_history_table=include_history_table,
include_reference_table=include_reference_table,
include_linked_content=include_linked_content,
include_report_content=include_report_content,
margin15mm = margin15mm,
#**kw
)
)
request = container.REQUEST
request.form['portal_status_message'] = translateString('Preview updated.')
request.form['cancel_url'] = cancel_url
request.form['portal_skin'] = portal_skin
request.form['format'] = format
request.form['display_svg'] = display_svg
request.form['document_save'] = document_save
request.form['document_download'] = document_download
request.form['override_document_description'] = override_document_description
request.form['override_document_short_title'] = override_document_short_title
request.form['override_document_title'] = override_document_title
request.form['override_document_version'] = override_document_version
request.form['override_logo_reference'] = override_logo_reference
request.form['override_source_person_title'] = override_source_person_title
request.form['override_document_reference'] = override_document_reference
request.form['override_source_organisation_title'] = override_source_organisation_title
request.form['transformation'] = transformation
request.form['include_content_table'] = include_content_table
request.form['include_history_table'] = include_history_table
request.form['include_reference_table'] = include_reference_table
request.form['include_linked_content'] = include_linked_content
request.form['include_report_content'] = include_report_content
request.form['margin15mm'] = margin15mm
return context.Base_renderForm(dialog_id)
# ERP5 web uses format= argument, which is also a python builtin
# pylint: disable=redefined-builtin
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
request = container.REQUEST
request.form['portal_status_message'] = translateString('Preview updated.')
request.form['cancel_url'] = cancel_url
request.form['portal_skin'] = portal_skin
request.form['format'] = format
request.form['display_svg'] = display_svg
request.form['document_save'] = document_save
request.form['include_content_table'] = include_content_table
request.form['include_history_table'] = include_history_table
request.form['include_reference_table'] = include_reference_table
request.form['include_linked_content'] = include_linked_content
request.form['include_report_content'] = include_report_content
return context.Base_renderForm(dialog_id)
<?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>dialog_id=None, cancel_url=None, portal_skin=None, include_content_table=None, include_history_table= None, include_reference_table=None, include_linked_content=None, include_report_content=None, format=None,display_svg=None,document_save=None, *args,**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_updateContractDialog</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -24,20 +24,17 @@ Update a leaflet dialog with parameters manually entered
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
portal_status_message=translateString('Preview updated.'),
cancel_url=cancel_url,
portal_skin=portal_skin,
override_source_organisation_title=override_source_organisation_title,
override_source_person_title=override_source_person_title,
override_leaflet_header_title=override_leaflet_header_title,
format=format,
display_svg=display_svg,
display_side=display_side,
document_save=document_save,
document_download=document_download,
**kw
)
)
request = container.REQUEST
request.form['portal_status_message'] = translateString('Preview updated.')
request.form['cancel_url'] = cancel_url
request.form['portal_skin'] = portal_skin
request.form['override_source_organisation_title'] = override_source_organisation_title
request.form['override_source_person_title'] = override_source_person_title
request.form['override_leaflet_header_title'] = override_leaflet_header_title
request.form['format'] = format
request.form['display_svg'] = display_svg
request.form['display_side'] = display_side
request.form['document_save'] = document_save
request.form['document_download'] = document_download
return context.Base_renderForm(dialog_id)
......@@ -28,26 +28,23 @@ Update the letter dialog with parameters manually entered
# override_date to use instead of current date
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
portal_status_message=translateString('Preview updated.'),
cancel_url=cancel_url,
portal_skin=portal_skin,
override_source_organisation_title=override_source_organisation_title,
override_source_person_title=override_source_person_title,
override_destination_organisation_title=override_destination_organisation_title,
override_destination_person_title=override_destination_person_title,
override_date=override_date,
format=format,
display_head=display_head,
display_svg=display_svg,
document_download=document_download,
document_save=document_save,
destination_position_in_letter = destination_position_in_letter,
display_sender_company_above_recipient=display_sender_company_above_recipient,
destination_position_padding_left = destination_position_padding_left,
letter_header_margin_to_top = letter_header_margin_to_top,
**kw
)
)
request = container.REQUEST
request.form['portal_status_message'] = translateString('Preview updated.')
request.form['cancel_url'] = cancel_url
request.form['portal_skin'] = portal_skin
request.form['format'] = format
request.form['display_svg'] = display_svg
request.form['document_save'] = document_save
request.form['document_download'] = document_download
request.form['override_source_organisation_title'] = override_source_organisation_title
request.form['override_source_person_title'] = override_source_person_title
request.form['override_destination_organisation_title'] = override_destination_organisation_title
request.form['override_destination_person_title'] = override_destination_person_title
request.form['override_date'] = override_date
request.form['display_head'] = display_head
request.form['destination_position_in_letter'] = destination_position_in_letter
request.form['display_sender_company_above_recipient'] = display_sender_company_above_recipient
request.form['destination_position_padding_left'] = destination_position_padding_left
request.form['letter_header_margin_to_top'] = letter_header_margin_to_top
return context.Base_renderForm(dialog_id)
......@@ -23,19 +23,15 @@ Update a press release dialog with parameters manually entered
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
portal_status_message=translateString('Preview updated.'),
cancel_url=cancel_url,
portal_skin=portal_skin,
override_source_organisation_title=override_source_organisation_title,
override_source_person_title=override_source_person_title,
format=format,
display_svg=display_svg,
display_about=display_about,
document_save=document_save,
document_download=document_download,
**kw
)
)
request = container.REQUEST
request.form['portal_status_message'] = translateString('Preview updated.')
request.form['cancel_url'] = cancel_url
request.form['portal_skin'] = portal_skin
request.form['override_source_organisation_title'] = override_source_organisation_title
request.form['override_source_person_title'] = override_source_person_title
request.form['format'] = format
request.form['display_svg'] = display_svg
request.form['display_about'] = display_about
request.form['document_save'] = document_save
request.form['document_download'] = document_download
return context.Base_renderForm(dialog_id)
......@@ -27,18 +27,16 @@ Update the slide dialog with parameters manually entered
from Products.ERP5Type.Message import translateString
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
portal_status_message=translateString('Preview updated.'),
cancel_url=cancel_url,
portal_skin=portal_skin,
override_logo_reference=override_logo_reference,
override_source_organisation_title=override_source_organisation_title,
display_note=display_note,
display_svg=display_svg,
document_save=document_save,
document_download=document_download,
format=format,
)
)
request = container.REQUEST
request.form['portal_status_message'] = translateString('Preview updated.')
request.form['cancel_url'] = cancel_url
request.form['portal_skin'] = portal_skin
request.form['format'] = format
request.form['display_svg'] = display_svg
request.form['document_save'] = document_save
request.form['document_download'] = document_download
request.form['override_logo_reference'] = override_logo_reference
request.form['override_source_organisation_title'] = override_source_organisation_title
request.form['display_note'] = display_note
return context.Base_renderForm(dialog_id)
......@@ -47,17 +47,27 @@ if not img_src.lower().startswith("http"):
#END user ignoring guidelines
if img_src[0] == '/':
img_src = img_src[1:]
img_obj = context.restrictedTraverse(img_src.split("?")[0], None)
real_img_src = img_src.split("?")[0]
img_obj = context.restrictedTraverse(real_img_src, None)
# flag broken link until further notice
if img_obj is None:
return '<p style="color:red">The following image could not be found in erp5 OR is not following guidelines for links (eg no ./ prefix): <span style="font-weight:bold">%s</span></p>' % (img_src.split("?")[0])
return '<p style="color:red">The following image could not be found in erp5 OR is not following guidelines for links (eg no ./ prefix): <span style="font-weight:bold">%s</span></p>' % (real_img_src)
# img_src = "image_module/3/getData"
try:
img_type = img_obj.getContentType()
except AttributeError:
real_img_src = '/'.join(real_img_src.split('/')[:-1])
# img_obj is surely not None
img_obj = context.restrictedTraverse(real_img_src, None)
img_type = img_obj.getContentType()
# ensure alt attributes are set
if img_string.find('alt=') == -1:
img_string.replace ("src=", 'alt="%s" src=' % img_caption or img_obj.getTitle())
img_type = img_obj.getContentType()
# force svg display as svg or png
if img_type == "image/svg+xml":
if img_svg_format == "png":
......
......@@ -85,6 +85,11 @@ book_title = html_quote(override_document_title) if override_document_title else
if isinstance(book_content, unicode):
book_content = book_content.encode("UTF-8")
# backcompat
book_history_section_list = re.findall('<section.+?>.+?</section>', book_content, re.S)
for book_history_section in book_history_section_list:
book_content = book_content.replace(book_history_section, '')
# override for tests
if override_batch_mode:
book_modification_date = DateTime("1976-11-04")
......@@ -225,6 +230,7 @@ for image in re.findall('(<img.*?/>)', book_content):
if book_format == "html" or book_format == "mhtml":
context.REQUEST.RESPONSE.setHeader("Content-Type", "text/html; charset=utf-8")
book_output = book.WebPage_createBook(
book_history_section_list = book_history_section_list,
book_theme=book_theme.get("theme"),
book_title=book_title,
book_language=book_language,
......@@ -285,6 +291,7 @@ elif book_format == "pdf":
)
book_history = book.WebPage_createBookTableOfHistory(
book_history_section_list = book_history_section_list,
book_theme=book_theme.get("theme"),
book_title=book_title,
book_language=book_language,
......
<?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>*args,**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_viewAsContract</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -140,14 +140,24 @@ def removeEmptyDetails(my_content):
def addLastSlide(my_last_slide):
# XXXX This condition is not accurate
if my_last_slide.count("<div") != 2:
last_slide=None
# search first through web reference
if doc_theme['theme']:
last_slide_list = context.portal_catalog(
portal_type='Web Page',
reference='%s-Marketing.Slideshow.Last.Slide' % doc_theme['theme'].upper(),
limit=1)
if last_slide_list:
last_slide=last_slide_list[0]
if not last_slide:
# get default one
last_slide_relative_url = pref.getPreferredCorporateIdentityTemplateSlideLastSlideRelativeUrl()
if last_slide_relative_url:
# try:
last_slide = doc.restrictedTraverse(last_slide_relative_url)
if last_slide is not None:
if last_slide:
return last_slide.getTextContent()
#except AttributeError:
# last_slide_content = blank
return blank
# -------------------------- Setup ---------------------------------------------
......@@ -169,6 +179,8 @@ override_source_organisation_title = kw.get("override_source_organisation_title"
override_batch_mode = kw.get('batch_mode')
override_source_person_title = None
doc_theme = doc.Base_getThemeDict(doc_format=doc_format, css_path="template_css/slide", skin="Slide")
# --------------------- Convert any page into a slideshow ----------------------
# Note: mileage varies depending on the cleanliness of the HTML page
if doc_is_slideshow is None:
......@@ -250,7 +262,6 @@ if doc_reference is None:
doc_full_reference = '-'.join([doc_reference, doc_version, doc_language])
# --------------------------- Layout Parameters --------------------------------
doc_theme = doc.Base_getThemeDict(doc_format=doc_format, css_path="template_css/slide", skin="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="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>WebPage_exportAsContract</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Export this web page as a Contract in the chosen format.</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>format</string>
<string>include_history_table</string>
<string>include_content_table</string>
<string>include_reference_table</string>
<string>display_svg</string>
<string>document_save</string>
<string>portal_skin</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>include_linked_content</string>
<string>include_report_content</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebPage_viewExportAsContractDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>WebPage_viewExportAsContractDialog</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</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>Export Contract</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>WebPage_updateContractDialog</string> </value>
</item>
<item>
<key> <string>update_action_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="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>items</string>
<string>orientation</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>display_svg</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>orientation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>png</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Format to display SVG images in.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_radio_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list>
<tuple>
<string>svg</string>
<string>svg</string>
</tuple>
<tuple>
<string>png</string>
<string>png</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>orientation</string> </key>
<value> <string>horizontal</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Svg Output Format</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>document_save</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Save generated document in Document module.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Save in Document Module</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>enabled</string>
<string>items</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>format</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string>html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Document output format.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_format</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list>
<tuple>
<string>html</string>
<string>html</string>
</tuple>
<tuple>
<string>pdf</string>
<string>pdf</string>
</tuple>
<tuple>
<string>mhtml</string>
<string>mhtml</string>
</tuple>
</list>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>include_content_table</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Display table of content.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Include Table Of Content</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>include_history_table</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Display table of versions and signatures.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Include History Table</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>include_linked_content</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Embed linked internal documents.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Embed Linked Documents</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>include_reference_table</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Display table of references.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Include Reference Tables</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>include_report_content</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Generate and embed linked report documents.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Embed Report Documents</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_skin</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string>hidden</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Book</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Portal skin to be used.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_portal_skin</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Portal Skin</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>contract.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></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="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>contract.pdf.css</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/css</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -32,8 +32,28 @@ html .ci-slideshow code {
font-size: .4em;
}
/* line number */
html .ci-slideshow pre {
counter-reset: lines;
}
html .ci-slideshow pre .line {
counter-increment: lines;
}
html .ci-slideshow pre .line::before {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
content: counter(lines);
text-align: right;
width:1em;
display: inline-block;
padding-right: 0.5em;
margin-right: 0.5em;
color: #BBB;
border-right: solid 1px;
}
/*
......
......@@ -6,6 +6,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Cacheable__manager_id</string> </key>
<value> <string>http_cache</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>slide.css</string> </value>
......
......@@ -163,6 +163,7 @@ ul.ci-web-header-menu-lang{
overflow: hidden;
margin: 0;
padding: 0;
top:2px;
}
ul.ci-web-header-menu-lang:hover {
......
erp5_corporate_identity_test
erp5_web_renderjs_ui_test_core
\ No newline at end of file
Test and output files used for portal component tests of erp5_corporate_identity. Tests.
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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