Commit 4366ff62 authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: update templates css and test files

parent 032fe88e
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts12760834.19</string> </value>
<value> <string>ts13079037.2</string> </value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>66b09b5f3ff227960a5185078910d7e2</string> </value>
<value> <string>f8add37a3e8b489e8b5c21e7d8c84a81</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>112044</int> </value>
<value> <int>115135</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.110.55627.28808</string> </value>
<value> <string>964.136.38063.53811</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -300,7 +300,7 @@
</tuple>
<state>
<tuple>
<float>1512759639.67</float>
<float>1513079037.21</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts12759663.66</string> </value>
<value> <string>ts13079060.61</string> </value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>f917d4ff74681b5c2918d7e721122ad6</string> </value>
<value> <string>cb26151b5c7e18d9e22c9198f7c1a9d6</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>114563</int> </value>
<value> <int>114621</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.63989.14575.52462</string> </value>
<value> <string>964.117.4160.48332</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -300,7 +300,7 @@
</tuple>
<state>
<tuple>
<float>1512759663.69</float>
<float>1513079060.61</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts12758615.31</string> </value>
<value> <string>ts13084690.37</string> </value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>45e7f3ba8ccc4ed93ba811e914badd1d</string> </value>
<value> <string>a4d287657642dce1324a5231cd913591</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.38.17909.20599</string> </value>
<value> <string>964.5447.3207.29696</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -300,7 +300,7 @@
</tuple>
<state>
<tuple>
<float>1512758615.32</float>
<float>1513084690.39</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts12758762.55</string> </value>
<value> <string>ts13084810.3</string> </value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>8b961021dd740c5dd7195fe5c3e50157</string> </value>
<value> <string>8824fb3bf650e99f5a87588c04bb2384</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.62461.45600.31863</string> </value>
<value> <string>964.5447.43346.6860</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -300,7 +300,7 @@
</tuple>
<state>
<tuple>
<float>1512758762.58</float>
<float>1513084810.31</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts12758830.19</string> </value>
<value> <string>ts13084870.95</string> </value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>a54bfd72ea17ebce54b5a2e317b415f6</string> </value>
<value> <string>6004b1491303329de6b7a74504e424f1</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.31.34634.7662</string> </value>
<value> <string>964.5448.3473.64256</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -300,7 +300,7 @@
</tuple>
<state>
<tuple>
<float>1512758830.2</float>
<float>1513084870.98</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts12758707.81</string> </value>
<value> <string>ts13084746.19</string> </value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>de643cede136588e8eae013f073d1393</string> </value>
<value> <string>b155aa8c818eec2469d45661492ae2b0</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.62460.42922.17629</string> </value>
<value> <string>964.5447.26215.1911</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -300,7 +300,7 @@
</tuple>
<state>
<tuple>
<float>1512758707.82</float>
<float>1513084746.38</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts12758893.98</string> </value>
<value> <string>ts13084939.2</string> </value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
......@@ -83,7 +83,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>f43a439add4a8c64862f1229227703c3</string> </value>
<value> <string>fc6ed78f148e33a0a73cf6acf02254e3</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -282,7 +282,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.40.5514.27153</string> </value>
<value> <string>964.5444.36473.31795</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -300,7 +300,7 @@
</tuple>
<state>
<tuple>
<float>1512758893.99</float>
<float>1513084939.22</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>b34ec9e6f51725e1606d6af188be1072</string> </value>
<value> <string>2f5fe46dacb1043b5847191649a8c302</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.65367.30779.6212</string> </value>
<value> <string>964.116.46067.34201</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512759642.03</float>
<float>1513079038.98</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>1142739e8809eef22c04dc01ca1f9763</string> </value>
<value> <string>59370ff75e73aa79f4c245764801dba7</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.63989.22270.17681</string> </value>
<value> <string>964.117.8617.9011</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512759667.8</float>
<float>1513079063.25</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>940f63d0b3c2f566d27ed9fed3af1919</string> </value>
<value> <string>2d1998b227b2587778ce6147baf69bfa</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.63983.41752.31027</string> </value>
<value> <string>964.116.22477.45226</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512759620.51</float>
<float>1513079021.28</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.38.20327.62190</string> </value>
<value> <string>964.5447.7593.64341</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512758628.68</float>
<float>1513084718.88</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.38.55346.9847</string> </value>
<value> <string>964.5447.45041.13875</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512758770.93</float>
<float>1513084827.26</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.39.9765.29593</string> </value>
<value> <string>964.5448.8856.41864</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512758838.41</float>
<float>1513084876.05</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.38.38259.20497</string> </value>
<value> <string>964.5447.28178.61388</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512758714.35</float>
<float>1513084762.06</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -270,7 +270,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.39.26886.4573</string> </value>
<value> <string>964.5448.27219.29013</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -288,7 +288,7 @@
</tuple>
<state>
<tuple>
<float>1512758899.13</float>
<float>1513084941.81</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -240,7 +240,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.114.51202.36573</string> </value>
<value> <string>964.5438.50603.8004</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1512759547.22</float>
<float>1513078977.78</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -241,7 +241,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.65388.53910.29917</string> </value>
<value> <string>964.115.28063.25565</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -259,7 +259,7 @@
</tuple>
<state>
<tuple>
<float>1512759565.63</float>
<float>1513078992.92</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -41,7 +41,8 @@
<div id="legalese">
<p class="top"><span>&copy;</span><span>Test Organisation 2017</span></p>
<p class="top"><span>&copy;</span><span>Test Organisation 2017</span>
</p>
<p>
<span>Test Organisation</span><br />
<span>Test Drive 123</span><br />
......@@ -210,7 +211,7 @@
<div class="ci-leaflet-container-right">
<span>&copy;</span><span>2017 Test Organisation</span>
<br />
<span>Test Sender</span>&nbsp;<span class="page"></span> | <span class="topage"></span>
<span>Test Sender</span> <span class="page"></span> | <span class="topage"></span>
</div>
</div>
......
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1512759540.29</float>
<float>1513078975.2</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -172,7 +172,7 @@
<div class="ci-leaflet-container-right">
<span>&copy;</span><span>2017 Test Association</span>
<br />
<span>Test Recipient</span>&nbsp;<span class="page"></span> | <span class="topage"></span>
<span>Test Recipient</span> <span class="page"></span> | <span class="topage"></span>
</div>
</div>
......
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1512759561.51</float>
<float>1513078990.09</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -41,7 +41,8 @@
<div id="legalese">
<p class="top"><span>&copy;</span><span> 2017</span></p>
<p class="top"><span>&copy;</span><span> 2017</span>
</p>
<p>
<span></span><br />
<span></span><br />
......@@ -210,7 +211,7 @@
<div class="ci-leaflet-container-right">
<span>&copy;</span><span>2017 </span>
<br />
<span>Test Author</span>&nbsp;<span class="page"></span> | <span class="topage"></span>
<span>Test Author</span> <span class="page"></span> | <span class="topage"></span>
</div>
</div>
......
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1512759579.92</float>
<float>1513079002.66</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1512758530.46</float>
<float>1513084600.81</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1512758545.53</float>
<float>1513084634.43</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1512758556.58</float>
<float>1513084646.51</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -44,7 +44,7 @@ if source is None:
if override_source_person_title is not None or override_source_person_title is blank:
source_person_list = getCommonProxyParameter("override_person", override_source_person_title)
if len(source_person_list) == 0:
source_person_list = getCommonProxyParameter("author", None)
source_person_list = getCommonProxyParameter("author", None) or []
if len(source_person_list) > 0:
source_person = source_person_list[0]
contributor_title_string = ', '.join(x.get("name", blank) for x in source_person_list)
......@@ -55,9 +55,9 @@ if source is None:
if len(source_organisation_list) == 0:
source_organisation_uid = getCustomParameter("source_organisation_uid", None)
if source_organisation_uid:
source_organisation_list = getCommonProxyParameter("sender", source_organisation_uid)
source_organisation_list = getCommonProxyParameter("sender", source_organisation_uid) or []
if len(source_organisation_list) == 0 and default_company_title:
source_organisation_list = getCommonProxyParameter("override_organisation", html_quote(default_company_title))
source_organisation_list = getCommonProxyParameter("override_organisation", default_company_title) or []
if len(source_organisation_list) == 0 and source_person is not None:
source_organisation_list = getCommonProxyParameter("source", source_person.get("uid")) or []
if len(source_organisation_list) > 0:
......@@ -75,7 +75,7 @@ else:
# override specific bank account (no default to pick correct one if multiple exist)
if default_bank_account_uid is not None:
override_bank_account_list = getCommonProxyParameter("bank", default_bank_account_uid)
override_bank_account_list = getCommonProxyParameter("bank", default_bank_account_uid) or []
if len(override_bank_account_list) > 0:
override_bank_account = override_bank_account_list[0]
source["bank"] = override_bank_account.get("bank")
......
......@@ -65,7 +65,6 @@ if theme is not None:
if theme is None:
theme = "default"
# XXX fallback images on portal_skin folders not found on convert
theme_dict = {}
theme_dict["theme"] = theme
theme_dict["theme_logo_description"] = theme_logo_description
......@@ -74,5 +73,4 @@ theme_dict["template_css_url"] = ''.join([url, css_path, pdf, ".css"])
theme_dict["fallback_img_url"] = ''.join([url, '/', img])
theme_dict["theme_css_font_list"] = getCustomParameter(font, None) or []
theme_dict["theme_css_url"] = getCustomParameter(css, None) or getCommonParameter(css, None) or blank
return theme_dict
......@@ -3,6 +3,20 @@
Save, download or return generated PDF Document
================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
# doc_download download this document in HTML format
# doc_save save this web page in HTML format
# doc_version version of the document
# doc_title title of the document
# doc_relative_url relative url to set as follow-up
# doc_language language of the document
# doc_reference reference of the document
# doc_full_reference full reference with version/language
# doc_modification_date date to set as initial date
# doc_pdf_file pdf content to store
# doc_aggregate_list not applicable (only used for events)
if doc_save == 1:
dms_module = getattr(context, 'document_module', None)
if dms_module is not None:
......@@ -19,7 +33,8 @@ if doc_save == 1:
source_reference=''.join([doc_reference, '.pdf']),
file=doc_pdf_file
)
context.setAggregate(document.getRelativeUrl())
if getattr(context, "aggregate", None) is not None:
context.setAggregate(document.getRelativeUrl())
message = context.Base_translateString(
'%(portal_type)s created successfully as PDF Document.' % {
'portal_type': document.getTranslatedPortalType()
......
......@@ -4,14 +4,15 @@ Return local parameters that require proxy role to access
================================================================================
"""
portal_type_valid_list = ["Web Site", "Web Section", "Web Page", "Letter"]
portal_type_valid_template_list = ["Web Site", "Web Section", "Web Page", "Letter"]
portal_type_valid_report_list = ["Project", "Sale Order", "Sale Opportunity"]
portal_type = context.getPortalType()
portal_object = context.getPortalObject()
if REQUEST is not None:
return None
if portal_type not in portal_type_valid_list:
if portal_type not in portal_type_valid_template_list and portal_type not in portal_type_valid_report_list:
return None
def err(my_value):
......@@ -182,7 +183,9 @@ if pass_parameter is not None and pass_source_data is not None:
# -------------------------- Contributor -------------------------------------
# returns [{person_dict}, {person_dict...}]
if pass_parameter == "author":
return populatePersonDict(context.getContributorValueList(*args, **kw))
if portal_type in portal_type_valid_template_list:
return populatePersonDict(context.getContributorValueList(*args, **kw))
return []
# ------------- Override Sender/Recipient Organisation -----------------------
# returns [{organisation_dict}]
......
......@@ -3,8 +3,19 @@
Upgrade image for the specific type of display
================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
# img_string required, <img src=... />
# img_wrap wrap image in a <p> tag and center it
# img_fullscreen_link wrap image in a link to fullscreen version
# img_caption caption to use for this image/alt attribute
# img_svg_format display image as svg (default png/None)
import re
if img_string is None or img_string == "":
return img_string
img_src = re.findall("src=['\"](.*?)['\"]", img_string)[0]
img_obj = context.restrictedTraverse(img_src.split("?")[0])
img_type = img_obj.getContentType()
......@@ -27,8 +38,8 @@ if img_type == "image/svg+xml":
img_string = img_string.replace('src=', "type='image/svg+xml' src=")
img_string = img_string.replace('format=png', 'format=svg')
# wrap image in link
if img_wrap:
# wrap image in fullscreen link
if img_fullscreen_link:
img_string = ''.join([
'<a target="_blank" rel="noopener noreferrer" href="%s" title="%s">%s<a>' % (
img_src,
......@@ -37,4 +48,8 @@ if img_wrap:
)
])
# wrap image in <p> tag
if img_wrap:
img_string = '<p class="ci-book-img" style="text-align:center">' + img_string + '</p>'
return img_string
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>img_string=None, img_wrap=None, img_svg_format=None, image_caption=None</string> </value>
<value> <string>img_string=None, img_wrap=None, img_svg_format=None, img_fullscreen_link=None, image_caption=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -76,9 +76,9 @@
<list>
<string>format</string>
<string>display_side</string>
<string>portal_skin</string>
<string>display_svg</string>
<string>document_save</string>
<string>portal_skin</string>
</list>
</value>
</item>
......
......@@ -76,9 +76,9 @@
<list>
<string>format</string>
<string>portal_skin</string>
<string>display_svg</string>
<string>display_head</string>
<string>display_source_address</string>
<string>display_svg</string>
<string>document_save</string>
</list>
</value>
......
......@@ -77,8 +77,8 @@
<string>format</string>
<string>display_note</string>
<string>display_svg</string>
<string>portal_skin</string>
<string>document_save</string>
<string>portal_skin</string>
</list>
</value>
</item>
......
......@@ -77,6 +77,7 @@
<string>portal_skin</string>
<string>display_side</string>
<string>display_svg</string>
<string>document_save</string>
</list>
</value>
</item>
......
......@@ -301,7 +301,7 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Leaflet&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;display_side=%s&amp;override_leaflet_header_title=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_person_title", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("display_side", 1), context.REQUEST.get("override_leaflet_header_title", ""), context.REQUEST.get("display_svg", "png"))
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Leaflet&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;display_side=%s&amp;override_leaflet_header_title=%s&amp;display_svg=%s&amp;document_save=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_person_title", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("display_side", 1), context.REQUEST.get("override_leaflet_header_title", ""), context.REQUEST.get("display_svg", "png"), context.REQUEST.get("document_save", ""))
]]></string> </value>
</item>
......
<?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>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>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>
......@@ -78,6 +78,7 @@
<string>display_head</string>
<string>display_source_address</string>
<string>display_svg</string>
<string>document_save</string>
</list>
</value>
</item>
......
......@@ -301,7 +301,7 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Letter&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;override_destination_person_title=%s&amp;override_destination_organisation_title=%s&amp;display_head=%s&amp;override_date=%s&amp;display_source_address=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_person_title", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_destination_person_title", ""), context.REQUEST.get("override_destination_organisation_title", ""), context.REQUEST.get("display_head", 1), context.REQUEST.get("override_date", ""), context.REQUEST.get("display_source_address", ""), context.REQUEST.get("display_svg", "png"))
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Letter&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;override_destination_person_title=%s&amp;override_destination_organisation_title=%s&amp;display_head=%s&amp;override_date=%s&amp;display_source_address=%s&amp;display_svg=%s&amp;document_save=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_person_title", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_destination_person_title", ""), context.REQUEST.get("override_destination_organisation_title", ""), context.REQUEST.get("display_head", 1), context.REQUEST.get("override_date", ""), context.REQUEST.get("display_source_address", ""), context.REQUEST.get("display_svg", "png"), context.REQUEST.get("document_save", ""))
]]></string> </value>
</item>
......
<?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>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>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>
......@@ -77,6 +77,7 @@
<string>display_note</string>
<string>portal_skin</string>
<string>display_svg</string>
<string>document_save</string>
</list>
</value>
</item>
......
......@@ -301,7 +301,7 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Slide&amp;override_source_organisation_title=%s&amp;override_logo_reference=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("display_svg", "png"))
python: \'<iframe width="100%%" height="500" style="background-color:#FFFFFF;box-sizing:border-box;-wekbit-box-sizing:border-box;" src="%s/WebPage_viewAsWeb?portal_skin=Slide&amp;override_source_organisation_title=%s&amp;override_logo_reference=%s&amp;display_svg=%s&amp;document_save=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("display_svg", "png"), context.REQUEST.get("document_save"))
]]></string> </value>
</item>
......
<?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>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>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>
/* ========================================================================== */
/* ===================== Font Declarations ================================= */
/* ========================================================================== */
/* fonts are declared in default theme, so any custom themes.css can override */
.ci-letter .ci-letter-header span,
.ci-letter .ci-letter-head-right .ci-letter-timestamp span,
.ci-letter .ci-letter-head-right .ci-letter-page span,
.ci-letter .ci-letter-head .ci-letter-destination span {
font-family: "Roboto", Arial, sans-serif;
font-weight: normal;
}
.ci-letter span,
/*.ci-letter .ci-letter-head table tr td:last-child span, */
/*.ci-letter .ci-letter-head .ci-letter-destination span, */
.ci-letter .ci-letter-body p b i,
.ci-letter .ci-letter-body p,
.ci-letter .ci-letter-body {
font-family: "Heuristica", Helvetica, serif;
font-weight: normal;
}
.ci-letter .ci-letter-head .ci-letter-source span,
.ci-letter .ci-letter-footer table td div span {
font-family: "Roboto Condensed", Arial, sans-serif;
font-weight: normal;
}
.ci-letter .ci-letter-header td span {
font-family: "Roboto Condensed", Arial, sans-serif !important;
font-weight: normal !important;
}
.ci-leaflet p,
.ci-leaflet li {
font-family: 'Heuristica', 'Helvetica', Times, serif;
}
.ci-leaflet h1,
.ci-leaflet h2,
.ci-leaflet .ci-leaflet-footer div,
.ci-leaflet-header p,
.ci-leaflet p.ci-leaflet-source-header,
.ci-leaflet p.ci-leaflet-sheet-header,
.ci-leaflet #left-summary p,
.ci-leaflet #left-summary li,
.ci-leaflet #main-content .left-icon .excerpt,
.ci-leaflet #legalese .bottom {
font-family: 'Roboto', Arial, sans-serif;
}
.ci-slideshow h1,
.ci-slideshow h2,
.ci-slideshow .ci-slideshow-handout h1,
.ci-slideshow .ci-slideshow-handout h2,
.ci-slideshow .ci-slideshow-intro:before,
.ci-slideshow h1 ~ *,
.ci-slideshow h2 ~ *,
.ci-slideshow-footer div {
font-family: 'Roboto', Arial, sans-serif;
}
.ci-slideshow details,
.ci-slideshow-handout details {
font-family: 'Heuristica', 'Helvetica', Times, serif;
}
html .ci-slideshow pre,
html .ci-slideshow code {
font-family: "Courier New", Courier, monospace, sans-serif;
}
.ci-book * {
font-family: "Heuristica", Helvetica, "Times", serif;
font-weight: normal;
font-style: normal;
}
.ci-book caption {
font-family: "Heuristica", Helvetica, "Times", serif;
font-weight: normal;
font-style: normal !important;
}
.ci-book pre,
.ci-book code {
/* does not load: font-family: "TexGyreCursor", Monospace, Arial; */
font-family: "Roboto", Arial, sans-serif;
font-weight: normal;
font-style: normal;
}
.ci-book strong {
font-weight: bold;
font-style: normal;
}
.ci-book table thead th b,
.ci-book table thead td strong,
.ci-book table tbody td b,
.ci-book table tbody td strong,
.ci-book table tbody td div,
.ci-book table tbody th div,
.ci-book table tbody td span,
.ci-book table tbody th span {
font-family: "Roboto Condensed", Arial, 'Noto Sans Sc', SimHei, STXihei, sans-serif;
font-weight: normal;
font-style: normal;
}
/* XXX custom report css */
.ci-book div.ci-book-box-offer div,
.ci-book div.ci-book-box-offer-milestone div {
font-family: "Roboto Condensed", Arial, 'Noto Sans Sc', SimHei, STXihei, sans-serif;
}
.ci-book .ci-book-box-offer *,
.ci-book .ci-book-box-offer-milestone * {
font-family: "Roboto Condensed", Arial, 'Noto Sans Sc', SimHei, STXihei, sans-serif !important;
}
.ci-book .ci-book-footer .ci-book-footer-copy,
.ci-book table th,
.ci-book table th span,
.ci-book table td,
.ci-book table td li,
.ci-book table tbody td p,
.ci-book table tbody td p em,
.ci-book table th a,
.ci-book table td a,
.ci-book table td i {
font-family: "Roboto Condensed", Arial, 'Noto Sans Sc', SimHei, STXihei, sans-serif;
font-weight: normal;
}
.ci-book h1,
.ci-book h2,
.ci-book h3,
.ci-book h4,
.ci-book h5,
.ci-book h6,
.ci-book .ci-book-header td div,
.ci-book .ci-book-header .ci-book-header-key,
.ci-book .ci-book-header .ci-book-header-value,
.ci-book .ci-book-header td div span,
.ci-book .ci-book-footer td span,
.ci-book .ci-book-header td div,
.ci-book table td em {
font-family: "Roboto", Arial, 'Noto Sans Sc', SimHei, STXihei, sans-serif;
font-weight: normal;
}
/* ========================================================================== */
/* ======================= Default THEME =================================== */
/* ========================================================================== */
......
......@@ -58,7 +58,7 @@ Generate the leaflet footer
<div class="ci-leaflet-container-right">
<span>&copy;</span><span tal:content="python: leaflet_year + ' ' + leaflet_copyright"></span>
<br/>
<span tal:content="python: leaflet_contributor_list"></span>&nbsp;<span class="page"></span> | <span class="topage"></span>
<span tal:content="python: leaflet_contributor_list"></span> <span class="page"></span> | <span class="topage"></span>
</div>
</div>
</tal:block>
......
......@@ -17,7 +17,8 @@ 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 />
......
......@@ -109,6 +109,7 @@ leaflet_version = leaflet.getVersion() or "001"
leaflet_aggregate_list = []
leaflet_modification_date = leaflet.getModificationDate()
# XXX not matter what, live tests will say \xc2\xa9 and erp5 \xa9
# u"©".encode("utf8")
#leaflet_copy = u"\u00A9".encode('utf-8') | unicode('©', 'utf8') | '©'.encode('utf-8').strip()
if leaflet_language and leaflet_format == "pdf":
......@@ -186,10 +187,9 @@ if leaflet_display_side:
leaflet_phone=leaflet_source.get("phone", None) or blank,
leaflet_date=leaflet_date,
leaflet_year=leaflet_year,
leaflet_recycle_url=leaflet_recycle_url,
leaflet_recycle_url=leaflet_recycle_url
)
leaflet_content = leaflet_legalese + leaflet_content
leaflet_content = leaflet_legalese.decode() + leaflet_content.decode()
# ========================= TRANSFORMATION: book ===============================
# XXX still dirty
......
......@@ -82,9 +82,8 @@ html{
}
}
.ci-leaflet .ci-leaflet-container-left img {
max-width: 8em;
max-height: 2.5em;
min-width: initial;
height: 4em;
}
.ci-leaflet .ci-leaflet-container-left {
text-align: left;
......
......@@ -14,29 +14,29 @@ html{
.ci-leaflet #left-summary .title,
.ci-leaflet p.ci-leaflet-source-header,
.ci-leaflet p.ci-leaflet-sheet-header {
font-size: /*42px;*/ 28px;
font-size: 28px;
}
.ci-leaflet h2,
.ci-leaflet #main-content .summary,
.ci-leaflet #legalese .bottom {
font-size: /*30px;*/ 18px;
font-size: 18px;
}
.ci-leaflet p,
.ci-leaflet li,
.ci-leaflet div p:last-child {
font-size: /*26px;*/ 16px;
font-size: 16px;
}
.ci-leaflet #left-summary li {
font-size: /*24px;*/ 16px;
font-size: 16px;
}
.ci-leaflet-footer div {
font-size: /*18px;*/ 14px;
font-size: 14px;
}
.ci-leaflet #legalese p,
.ci-leaflet #legalese span,
.ci-leaflet #left-summary .excerpt,
.ci-leaflet #main-content .left-icon .excerpt {
font-size: /*20px;*/ 14px;
font-size: 11px;
}
/* === font style === */
.ci-leaflet #main-content .summary {
......@@ -87,7 +87,8 @@ html{
text-align: center;
}
.ci-leaflet .ci-leaflet-container-left img {
max-height: 16mm;
max-width: 120px;
height: initial;
}
.ci-leaflet .ci-leaflet-container-left {
text-align: left;
......@@ -188,8 +189,8 @@ html{
resize all fonts in the whole document */
.ci-leaflet #main-content > .left-icon {
position: absolute;
margin-top: 20mm;
margin-bottom: 10mm;
margin-top: 0;
margin-bottom: 0;
width: 28%;
left: 5mm;
text-align: center;
......@@ -199,10 +200,10 @@ html{
box-sizing: border-box;
}
.ci-leaflet #main-content .left-icon {
padding-top: 15%;
padding-top: 12%;
}
.ci-leaflet #main-content .left-icon ~ .left-icon {
padding-top: 4%;
padding-top: 0%;
}
.ci-leaflet #main-content .left-icon img {
width: 100%;
......
......@@ -158,7 +158,10 @@ letter_destination = letter.Base_getDestinationDict(
for image in re.findall('(<img.*?/>)', letter_content):
letter_content = letter_content.replace(
image,
context.WebPage_validateImage(img_string=image, img_svg_format=letter_display_svg)
context.WebPage_validateImage(
img_string=image,
img_svg_format=letter_display_svg
)
)
# ============================= Format: html ===================================
......
......@@ -260,7 +260,10 @@ doc_source = doc.Base_getSourceDict(
for image in re.findall('(<img.*?/>)', doc_content):
doc_content = doc_content.replace(
image,
context.WebPage_validateImage(img_string=image, img_svg_format=doc_display_svg)
context.WebPage_validateImage(
img_string=image,
img_svg_format=doc_display_svg
)
)
# ========================= TRANSFORMATION: book ===============================
......
......@@ -280,11 +280,6 @@ html .ci-slideshow .ci-slideshow-footer > div {
}
html .ci-slideshow .ci-slideshow-header > div img,
html .ci-slideshow .ci-slideshow-footer > div img {
/*
max-width: 8em;
min-width: initial;
height: 4em;
*/
max-height: 2.5em;
min-width: initial;
}
......
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