Commit 30532f1c authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: revert !=/==, cleanup

parent a2d962cb
......@@ -17,9 +17,9 @@ Save, download or return generated HTML Document
# doc_html_file text content for document
# doc_aggregate_list not applicable (only used for events)
if doc_save == 1:
if doc_save:
web_page_module = getattr(context, 'web_page_module', None)
if web_page_module != None:
if web_page_module is not None:
web_page = web_page_module.newContent(
portal_type="Web Page",
version=doc_version,
......@@ -44,7 +44,7 @@ if doc_save == 1:
#XXX else:
# download
elif doc_download == 1:
elif doc_download:
context.REQUEST.RESPONSE.setHeader("Content-Type", "text/html;")
context.REQUEST.RESPONSE.setHeader("Content-Disposition", 'attachment; filename="' + doc_full_reference + '.html"')
......
......@@ -13,7 +13,7 @@ blank = ''
# ---------------------------- Set Destination --------------------------------
# destination => Web Page = follow-up Organisation or Person, Event
if destination == None:
if destination is None:
destination_person = None
destination_person_list = []
destination_organisation = None
......@@ -21,7 +21,7 @@ if destination == None:
destination_uid = None
# destination person
if override_destination_person_title != None or override_destination_person_title == blank:
if override_destination_person_title is not None or override_destination_person_title == blank:
destination_person_list = context.Base_getTemplateProxyParameter(parameter="override_person", source_data=override_destination_person_title)
if len(destination_person_list) == 0:
destination_person_list = context.Base_getTemplateProxyParameter(parameter="person", source_data=None)
......@@ -29,11 +29,11 @@ if destination == None:
destination_person = destination_person_list[0]
# destination organisation
if override_destination_organisation_title != None or override_destination_organisation_title == blank:
if override_destination_organisation_title is not None or override_destination_organisation_title == blank:
destination_organisation_list = context.Base_getTemplateProxyParameter(parameter="override_organisation", source_data=override_destination_organisation_title)
if len(destination_organisation_list) == 0:
destination_organisation_list = context.Base_getTemplateProxyParameter(parameter="organisation", source_data=None)
if len(destination_organisation_list) == 0 and destination_person != None:
if len(destination_organisation_list) == 0 and destination_person is not None:
destination_organisation_list = context.Base_getTemplateProxyParameter(parameter="source", source_data=destination_person.get("uid")) or []
if len(destination_organisation_list) > 0:
destination_organisation = destination_organisation_list[0]
......
......@@ -18,7 +18,7 @@ from Products.PythonScripts.standard import html_quote
source_logo_url = None
default_bank_account_uid=context.Base_getTemplateParameter("default_bank_account_uid")
if source == None:
if source is None:
default_company_title=context.Base_getTemplateParameter("default_company_title")
contributor_title_string = blank
source_person = None
......@@ -29,7 +29,7 @@ if source == None:
source_set = None
# source person
if override_source_person_title != None or override_source_person_title == blank:
if override_source_person_title is not None or override_source_person_title == blank:
source_person_list = context.Base_getTemplateProxyParameter(parameter="override_person", source_data=override_source_person_title)
if len(source_person_list) == 0:
source_person_list = context.Base_getTemplateProxyParameter(parameter="author", source_data=None) or []
......@@ -39,7 +39,7 @@ if source == None:
# source organisation
# order: override => follow-up => default_organisation_uid => default_company_title => source_person career subordinate
if override_source_organisation_title != None or override_source_organisation_title == blank:
if override_source_organisation_title is not None or override_source_organisation_title == blank:
source_organisation_list = context.Base_getTemplateProxyParameter(parameter="override_organisation", source_data=override_source_organisation_title)
if len(source_organisation_list) == 0:
source_organisation_list = context.Base_getTemplateProxyParameter(parameter="organisation", source_data=None)
......@@ -49,7 +49,7 @@ if source == None:
source_organisation_list = context.Base_getTemplateProxyParameter(parameter="sender", source_data=source_organisation_uid) or []
if len(source_organisation_list) == 0 and default_company_title:
source_organisation_list = context.Base_getTemplateProxyParameter(parameter="override_organisation", source_data=default_company_title) or []
if len(source_organisation_list) == 0 and source_person != None:
if len(source_organisation_list) == 0 and source_person is not None:
for organisation_candidate in source_person_list:
organisation_candidate_list = context.Base_getTemplateProxyParameter(parameter="source", source_data=organisation_candidate.get("uid")) or []
if len(organisation_candidate_list) > 0:
......@@ -69,7 +69,7 @@ else:
source = context.Base_getTemplateProxyParameter(parameter="source", source_data=source_uid)[0]
# override specific bank account (no default to pick correct one if multiple exist)
if default_bank_account_uid != None:
if default_bank_account_uid is not None:
override_bank_account_list = context.Base_getTemplateProxyParameter(parameter="bank", source_data=default_bank_account_uid) or []
if len(override_bank_account_list) > 0:
override_bank_account = override_bank_account_list[0]
......@@ -87,12 +87,12 @@ if source.get("corporate_registration_code") is blank:
if override_logo_reference:
source_logo_url = html_quote(override_logo_reference) + "?format=png"
source_set = True
if source_logo_url == None:
if source_logo_url is None:
source_logo_url = source.get("logo_url", blank)
if source_logo_url != blank and source_set == None:
if source_logo_url != blank and source_set is None:
# XXX: test environment fails if url with parameters are supplied
source_logo_url = source_logo_url + "?format=png"
if source_logo_url == blank and theme_logo_url != None:
if source_logo_url == blank and theme_logo_url is not None:
source_logo_url = theme_logo_url
source["enhanced_logo_url"] = source_logo_url
......
......@@ -11,7 +11,7 @@ portal_object = context.getPortalObject()
validation_state = ('released', 'released_alive', 'published', 'published_alive',
'shared', 'shared_alive', 'public', 'validated')
if REQUEST != None:
if REQUEST is not None:
return None
if portal_type not in portal_type_valid_template_list and portal_type not in portal_type_valid_report_list:
......@@ -75,7 +75,7 @@ def populatePersonDict(my_person_list):
output_dict["name"] = person.getTitle() or err("title")
output_dict["title"] = person.getFunctionTitle() or err("function title")
output_dict["uid"] = person.getUid() or err("uid")
if person.getDefaultAddress() != None:
if person.getDefaultAddress() is not None:
output_dict["address"] = person_address.getStreetAddress() or err("street address")
output_dict["postal_code"] = person_address.getZipCode() or err("postal code")
output_dict["city"] = person_address.getCity() or err("city")
......@@ -83,17 +83,17 @@ def populatePersonDict(my_person_list):
output_dict["address"] = err("street_adress")
output_dict["postal_code"] = err("postal_code")
output_dict["city"] = err("city")
if person_region != None:
if person_region is not None:
output_dict["country"] = person_region.getTitle() or err("country")
output_dict["codification"] = person_region.getCodification() or err("country code")
else:
output_dict["country"] = err("country")
output_dict["codification"] = err("country code")
if person_default_telephone != None:
if person_default_telephone is not None:
output_dict["phone"] = person_default_telephone.getCoordinateText() or err("phone")
else:
output_dict["phone"] = err("phone")
if person_default_mail != None:
if person_default_mail is not None:
output_dict["email"] = person_default_mail.getUrlString() or err("email")
else:
output_dict["email"] = err("email")
......@@ -120,7 +120,7 @@ def populateOrganisationDict(my_organisation_list):
output_dict["activity_code"] = organisation.getActivityCode() or err("activitiy code")
#output_dict["logo_url"] = organisation.getDefaultImageAbsoluteUrl() or err("logo_url")
if organisation_default_image != None:
if organisation_default_image is not None:
output_dict["logo_url"] = organisation_default_image.getRelativeUrl()
else:
output_dict["logo_url"] = err("logo_url")
......@@ -132,7 +132,7 @@ def populateOrganisationDict(my_organisation_list):
output_dict["vat"] = organisation.getVatCode() or err("vat")
output_dict["corporate_registration"] = organisation.getCorporateRegistrationCode() or err("corporate_registration")
output_dict["email"] = organisation.getDefaultEmailText() or err("email")
if organisation.getDefaultAddress() != None:
if organisation.getDefaultAddress() is not None:
output_dict["address"] = organisation_address.getStreetAddress() or err("street address")
output_dict["postal_code"] = organisation_address.getZipCode() or err("postal code")
output_dict["city"] = organisation_address.getCity() or err("city")
......@@ -140,17 +140,17 @@ def populateOrganisationDict(my_organisation_list):
output_dict["address"] = err("street address")
output_dict["postal_code"] = err("postal code")
output_dict["city"] = err("city")
if organisation_region != None:
if organisation_region is not None:
output_dict["country"] = organisation_region.getTitle() or err("country")
output_dict["codification"] = organisation_region.getCodification() or err("country code")
else:
output_dict["country"] = err("country")
output_dict["codification"] = err("country code")
if organisation_phone != None:
if organisation_phone is not None:
output_dict["phone"] = organisation_phone.getDefaultTelephoneCoordinateText() or err("phone")
else:
output_dict["phone"] = err("phone")
if organisation_fax != None:
if organisation_fax is not None:
output_dict["fax"] = organisation_fax.getCoordinateText() or err("fax")
else:
output_dict["fax"] = err("fax")
......@@ -192,7 +192,7 @@ pass_parameter = kw.get("parameter", None)
pass_source_data = kw.get("source_data", None) or context.getUid()
pass_flag_site = kw.get("flag_site", None)
if pass_parameter != None and pass_source_data != None:
if pass_parameter is not None and pass_source_data is not None:
# ---------------------- Representative --------------------------------------
# returns [{person_dict}, {person_dict}] - used in press release
......@@ -248,7 +248,7 @@ if pass_parameter != None and pass_source_data != None:
if len(person_candidate_list) > 0:
for c in person_candidate_list:
organisation = c.getCareerSubordinationValue()
if organisation != None:
if organisation is not None:
return populateOrganisationDict([organisation])
else:
return populatePersonDict([c])
......@@ -301,7 +301,7 @@ if pass_parameter != None and pass_source_data != None:
return populateProductDictFromCategoryList(
context.getWebSiteValue().getMembershipCriterionCategoryList() or []
)
elif pass_source_data != None:
elif pass_source_data is not None:
return populateProductDict(context.getFollowUpValueList(
portal_type=pass_parameter,
checked_permission='View',
......@@ -316,7 +316,7 @@ if pass_parameter != None and pass_source_data != None:
theme = None
product_candidate_list = callSelf("product", pass_source_data, pass_flag_site)
if product_candidate_list != None:
if product_candidate_list is not None:
if len(product_candidate_list) > 0:
theme = getSubstringFromProduct(product_candidate_list[0], None)
......
......@@ -26,7 +26,7 @@ theme = (
context.Base_getTemplateParameter("theme") or
context.Base_getTemplateParameter("default_company_title")
)
if theme != None:
if theme is not None:
theme = theme.lower()
theme_logo_prefix = context.Base_getTemplateParameter("default_logo_prefix")
if theme_logo_prefix:
......@@ -34,14 +34,14 @@ if theme != None:
theme_logo_list = context.Base_getTemplateProxyParameter(parameter="logo", source_data=theme_reference)
if len(theme_logo_list) > 0:
theme_logo_dict = theme_logo_list[0]
if theme == None:
if theme is None:
theme = "default"
theme_dict = {}
theme_dict["theme"] = theme
theme_dict["theme_logo_description"] = theme_logo_dict.get("description", blank)
theme_dict["theme_logo_url"] = context.Base_getTemplateParameter("fallback_image")
if theme_logo_dict.get("relative_url", None) != None:
if theme_logo_dict.get("relative_url", None) is not None:
theme_dict["theme_logo_url"] = theme_logo_dict.get("relative_url") + param
theme_dict["template_css_url"] = css_path + pdf + ".css"
theme_dict["fallback_img_url"] = context.Base_getTemplateParameter("fallback_image") or blank
......
"""
================================================================================
Clean parameters which can be "" or "0" if passed through http
================================================================================
"""
# parameters:
# ------------------------------------------------------------------------------
# parameter Parameter to lookup
if param == "" or param == None or param == 0 or param == str(0):
return None
else:
return param
<?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>param=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_setToNone</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -32,7 +32,7 @@ Update a book report dialog with parameters manually entered
# requirement_relative_url XXX sale order has no direct relation to requirement
from Products.ERP5Type.Message import translateString
if dialog_id != None:
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
......
......@@ -33,19 +33,19 @@ blank = ''
# -------------------------- Setup ---------------------------------------------
letter = context
letter_format = kw.get('format', 'html')
letter_format = kw.get('format') or 'html'
letter_display_source_adress = kw.get('letter_display_source_adress', None)
letter_display_head = letter.Base_setToNone(param=kw.get('dislay_head', 1))
letter_display_svg = letter.Base_setToNone(param=kw.get('display_svg', 'png'))
letter_download = letter.Base_setToNone(param=kw.get('document_download', None))
letter_save = letter.Base_setToNone(param=kw.get('document_save', None))
letter_display_head = int(kw.get('dislay_head') or 1)
letter_display_svg = kw.get('display_svg') or 'png'
letter_download = int(kw.get('document_download') or 0)
letter_save = int(kw.get('document_save') or 0)
override_source_person_title = kw.get('override_source_person_title', None)
override_source_organisation_title = kw.get("override_source_organisation_title", None)
override_destination_person_title = kw.get("override_destination_person_title", None)
override_destination_organisation_title = kw.get("override_destination_organisation_title", None)
override_date = letter.Base_setToNone(param=kw.get("override_date", None))
override_batch_mode = letter.Base_setToNone(param=kw.get('batch_mode', None))
override_date = kw.get("override_date")
override_batch_mode = kw.get('batch_mode', None)
# -------------------------- Document Parameters ------------------------------
letter_portal_type = letter.getPortalType()
......@@ -57,7 +57,7 @@ if letter_portal_type == "Web Page":
letter_title = letter.getTitle()
letter_modification_date = DateTime(override_date) if override_date else letter.getCreationDate()
letter_content = letter.getTextContent()
letter_language = letter.Base_setToNone(param=letter.getLanguage())
letter_language = letter.getLanguage()
letter_aggregate_list = []
letter_source = None
letter_destination = None
......@@ -70,7 +70,7 @@ else:
letter_title = letter.getTitle()
letter_content = letter.getTextContent()
letter_aggregate_list = letter.getAggregateList()
letter_language = letter.Base_setToNone(param=kw.get('select_language'))
letter_language = kw.get('select_language')
letter_source = letter.getSource()
letter_destination = letter.getDestination()
# cut corner to retrieve path to css files
......@@ -78,14 +78,14 @@ else:
letter_reference = letter.getReference()
# overrides for tests
if override_batch_mode != None:
if override_batch_mode:
letter_modification_date = DateTime("1976-11-04")
if letter_language != None: #and letter_format == "pdf":
if letter_language and letter_language != blank:
letter.REQUEST['AcceptLanguage'].set(letter_language, 10)
if letter_language == None:
else:
letter_language = blank
if letter_reference == None:
if letter_reference is None:
letter_reference = letter_prefix + letter_title.replace(" ", ".")
letter_full_reference = '-'.join([letter_reference, letter_version, letter_language])
......@@ -260,7 +260,7 @@ if letter_format == "pdf":
)
# return file for comparison in portal-component tests
if override_batch_mode != None:
if override_batch_mode:
if letter_portal_type != "Web Page":
return pdf_file
......
......@@ -39,22 +39,22 @@ def translateText(snip):
# -------------------------- Setup ---------------------------------------------
doc = context
doc_download = None #XXX not yet implemented
doc_save = doc.Base_setToNone(param=kw.get('document_save', None))
doc_display_header = doc.Base_setToNone(param=kw.get('display_header', None))
doc_display_comment = doc.Base_setToNone(param=kw.get('display_comment', None))
doc_display_detail = doc.Base_setToNone(param=kw.get('display_detail', None))
doc_display_depth = doc.Base_setToNone(param=kw.get('display_depth', None))
override_document_title = kw.get('document_title', None)
override_document_version = kw.get('document_version', None)
override_document_reference = kw.get('document_reference', None)
override_document_language = kw.get('document_language', None)
override_batch_mode = doc.Base_setToNone(param=kw.get('batch_mode', None))
doc_report_name = kw.get('report_name', None)
doc_report_title = kw.get('report_title', None)
doc_format = doc.Base_setToNone(param=kw.get('format', None)) or 'html'
doc_requirement_relative_url = kw.get('requirement_relative_url', None)
doc_save = int(kw.get('document_save') or 0)
doc_display_header = int(kw.get('display_header') or 0)
doc_display_comment = int(kw.get('display_comment') or 0)
doc_display_detail = int(kw.get('display_detail') or 0)
doc_display_depth = int(kw.get('display_depth') or 0)
override_document_title = kw.get('document_title')
override_document_version = kw.get('document_version')
override_document_reference = kw.get('document_reference')
override_document_language = kw.get('document_language')
override_batch_mode = kw.get('batch_mode')
doc_report_name = kw.get('report_name')
doc_report_title = kw.get('report_title')
doc_format = kw.get('format') or 'html'
doc_requirement_relative_url = kw.get('requirement_relative_url')
# -------------------------- Document Parameters ------------------------------
doc_localiser = doc.getPortalObject().Localizer
......@@ -66,12 +66,11 @@ doc_revision = "1"
doc_modification_date = DateTime()
doc_short_date = doc_modification_date.strftime('%Y-%m-%d')
# XXX sigh for passing "" around
doc_reference = html_quote(override_document_reference) if doc.Base_setToNone(override_document_reference) != None else doc.Base_setToNone(doc.getReference()) or blank
doc_short_title = html_quote(doc_report_title) if doc.Base_setToNone(doc_report_title) != None else doc.Base_setToNone(doc.getShortTitle()) or blank
doc_version = html_quote(override_document_version) if doc.Base_setToNone(override_document_version) != None else doc.Base_setToNone(getattr(doc, "version", None)) or "001"
doc_title = html_quote(override_document_title) if doc.Base_setToNone(override_document_title) != None else doc.Base_setToNone(doc.getTitle()) or blank
doc_language = html_quote(override_document_language) if doc.Base_setToNone(override_document_language) != None else doc.Base_setToNone(doc.getLanguage())
doc_reference = html_quote(override_document_reference) if override_document_reference else doc.getReference() or blank
doc_short_title = html_quote(doc_report_title) if doc_report_title else doc.getShortTitle() or blank
doc_version = html_quote(override_document_version) if override_document_version else getattr(doc, "version", None) or "001"
doc_title = html_quote(override_document_title) if override_document_title else doc.getTitle() or blank
doc_language = html_quote(override_document_language) if override_document_language else doc.getLanguage()
doc_content = doc_report(
display_report=True,
......@@ -84,12 +83,12 @@ doc_content = doc_report(
)
# test overrides
if override_batch_mode != None:
if override_batch_mode:
doc_modification_date = DateTime("1976-11-04")
doc_revision = "1"
if doc_language != None:
if doc_language is not None:
doc.REQUEST['AcceptLanguage'].set(doc_language, 10)
if doc_language == None:
if doc_language is None:
doc_language = blank
if doc_reference == blank:
doc_reference = "Report." + doc_title.replace(" ", ".")
......
......@@ -8,7 +8,7 @@ Create a screenshot from a pdf file
# frame which page from the pdf file should be captured
# doc_id image on which this screenshot should be saved
if doc_id == None:
if doc_id is None:
return "Failed. Missing image id."
if context.getPortalType() != "PDF":
return "Failed. Not a pdf."
......
......@@ -56,7 +56,7 @@ Generates the letter Content
<tr>
<td></td>
<td class="ci-letter-source">
<tal:block tal:condition="python: letter_display_source_address != None">
<tal:block tal:condition="python: letter_display_source_address is not None">
<tal:block tal:condition="python: letter_source_company">
<span tal:content="letter_source_company"></span><span class="ci-letter-separator">-</span>
</tal:block>
......
......@@ -55,17 +55,17 @@ Creates the Letter footer section.
<div class="ci-letter-footer ci-letter-footer-simple">
<p class="ci-letter-simple-adress">
<span tal:content="python: letter_source_company_corporate_name"></span>&nbsp;
<tal:block tal:condition="python: letter_source_company_capital != None">
<tal:block tal:condition="python: letter_source_company_capital is not None">
<span i18n:translate="" i18n:domain="erp5_ui">au capital de</span>&nbsp;
<span tal:content="python: letter_source_company_capital"></span>
<span tal:content="python: letter_source_company_capital_currency or '&euro;'"></span>,
</tal:block>
<span tal:content="python: ''.join([letter_source_address, ', ', letter_source_postal_code, ' ', letter_source_city])"></span>
<br/>
<tal:block tal:condition="python: letter_source_registered_court != None">
<tal:block tal:condition="python: letter_source_registered_court is not None">
<span tal:content="python: letter_source_registered_court"></span> -
</tal:block>
<tal:block tal:condition="python: letter_source_ape_code != None">
<tal:block tal:condition="python: letter_source_ape_code is not None">
<span i18n:translate="" i18n:domain="erp5_ui">APE</span> : <span tal:content="letter_source_ape_code"></span> -
</tal:block>
<span i18n:translate="" i18n:domain="erp5_ui">N° TVA</span> : <span tal:content="python: letter_source_vat"></span>
......
"""
================================================================================
Return relevant (predecessor) context if Letter is a subobject
Return relevant (predecessor) context from which letter was created
================================================================================
"""
# parameters
......@@ -9,7 +9,7 @@ Return relevant (predecessor) context if Letter is a subobject
from zExceptions import Unauthorized
if context_url != None:
if context_url is not None:
try:
underlying_context = context.restrictedTraverse(context_url)
underlying_portal_type = underlying_context.getPortalType()
......
......@@ -54,7 +54,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getRelevantContext</string> </value>
<value> <string>Letter_getPredecessor</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -124,7 +124,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.Base_getRelevantContext(context_url=context.getRelativeUrl()).getData().encode("base64")</string> </value>
<value> <string>python: context.Letter_getPredecessor(context_url=context.getRelativeUrl()).getData().encode("base64")</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -61,7 +61,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 != None">
<tal:block tal:condition="python: book_include_history is not None">
<tal:block metal:use-macro="context/WebPage_createBookTableOfHistory/macros/book_history" />
</tal:block>
<tal:block tal:replace="structure book_table_of_content"></tal:block>
......
......@@ -27,7 +27,7 @@ Creates the Book sections (version, authors, etc).
<link rel="stylesheet" tal:attributes="href book_theme_css_url" />
<link rel="stylesheet" tal:attributes="href book_template_css_url" />
</head>
<body class="ci-book" tal:condition="python: book_include_history != None">
<body class="ci-book" tal:condition="python: book_include_history != 0">
<tal:block metal:use-macro="context/WebPage_createBookTableOfHistory/macros/book_history" />
</body>
</html>
......@@ -35,7 +35,8 @@ Creates the Book sections (version, authors, etc).
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="book_history">
<tal:block tal:condition="python: book_include_history != None">
<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">
<thead>
......
......@@ -34,7 +34,7 @@ Creates the Tables of references.
<link rel="stylesheet" tal:attributes="href book_theme_css_url" />
<link rel="stylesheet" tal:attributes="href book_template_css_url" />
</head>
<body class="ci-book" tal:condition="python: book_include_reference != None">
<body class="ci-book" tal:condition="python: book_include_reference != 0">
<tal:block metal:use-macro="context/WebPage_createBookTableOfReferences/macros/book_references" />
</body>
</html>
......@@ -42,8 +42,9 @@ Creates the Tables of references.
</tal:block>
<tal:block tal:condition="python: False">
<tal:block tal:condition="python: book_include_reference_table is not None">
<tal:block metal:define-macro="book_references">
<tal:comment tal:replace="nothing">We need to recheck in case macro is called directly</tal:comment>
<tal:block tal:condition="python: book_include_reference != 0">
<h1 i18n:translate="" i18n:domain="erp5_ui">Introduction</h1>
<h2 i18n:translate="" i18n:domain="erp5_ui">References</h2>
<p i18n:translate="" i18n:domain="erp5_ui">This section provides the list of applicable documents and references.</p>
......
......@@ -46,7 +46,7 @@ for figure in re.findall('(<img.*?/>)', document_content or ''):
figure_title[0],
figure_href[0]
)
if figure_doubles.get(figure_title[0], None) == None:
if figure_doubles.get(figure_title[0], None) is None:
item_dict = {}
item_dict["id"] = figure_id
item_dict["title"] = figure_title[0]
......
......@@ -44,7 +44,7 @@ Generates the complete leaflet
</tal:block>
<link rel="stylesheet" tal:attributes="href leaflet_theme_css_url" />
<link rel="stylesheet" tal:attributes="href leaflet_template_css_url" />
<tal:block tal:condition="python: leaflet_css != None">
<tal:block tal:condition="python: leaflet_css is not None">
<style type="text/css" tal:content="python: leaflet_css"></style>
</tal:block>
<script type="text/javascript">
......
......@@ -25,7 +25,7 @@ Generate leaflet content
</tal:block>
<link rel="stylesheet" tal:attributes="href leaflet_theme_css_url" />
<link rel="stylesheet" tal:attributes="href leaflet_template_css_url" />
<tal:block tal:condition="python: leaflet_css != None">
<tal:block tal:condition="python: leaflet_css is not None">
<style type="text/css" tal:content="python: leaflet_css"></style>
</tal:block>
</head>
......@@ -39,7 +39,7 @@ Generate leaflet content
<tal:block metal:define-macro="leaflet_content">
<div class="ci-two-page-main">
<h1 tal:content="python: leaflet_title"></h1>
<div tal:attributes="class python: 'ci-leaflet-body ' + ('' if leaflet_display_side == 1 else 'ci-leaflet-body-fullwidth')">
<div tal:attributes="class python: 'ci-leaflet-body ' + ('' if leaflet_display_side else 'ci-leaflet-body-fullwidth')">
<tal:block tal:content="structure leaflet_content"></tal:block>
</div>
</div>
......
......@@ -83,7 +83,7 @@ for citation in re.findall(r'\[(.*?)\]', document_content or ''):
item_dict["number"] = citation_info[1]
item_dict["version"] = citation_info[2]
item_dict["href"] = citation_href
if citation_ad_doubles.get(citation_href, None) == None:
if citation_ad_doubles.get(citation_href, None) is None:
citation_ad_doubles[citation_href] = citation_ad_count
citation_relevant_count = citation_ad_count
else:
......@@ -101,7 +101,7 @@ for citation in re.findall(r'\[(.*?)\]', document_content or ''):
item_dict["number"] = citation_info[1]
item_dict["version"] = citation_info[2]
item_dict["href"] = citation_href
if citation_rd_doubles.get(citation_href, None) == None:
if citation_rd_doubles.get(citation_href, None) is None:
citation_rd_doubles[citation_href] = citation_rd_count
citation_relevant_count = citation_rd_count
else:
......@@ -124,7 +124,7 @@ for citation in re.findall(r'\[(.*?)\]', document_content or ''):
item_dict["title"] = citation_info[0]
item_dict["description"] = citation_info[1]
item_dict["href"] = citation_href
if citation_ab_doubles.get(citation_href, None) == None:
if citation_ab_doubles.get(citation_href, None) is None:
citation_ab_doubles[citation_href] = citation_ab_count
citation_relevant_count = citation_ab_count
else:
......
......@@ -35,7 +35,7 @@ Generates the complete press release
</tal:block>
<link rel="stylesheet" tal:attributes="href release_theme_css_url" />
<link rel="stylesheet" tal:attributes="href release_template_css_url" />
<tal:block tal:condition="python: release_css != None">
<tal:block tal:condition="python: release_css is not None">
<style type="text/css" tal:content="python: release_css"></style>
</tal:block>
<script type="text/javascript">
......
......@@ -58,7 +58,7 @@ Generate press release about section
</div>
</div>
<tal:block tal:define="representative_list python: organisation.get('representative_list');">
<tal:block tal:condition="python: representative_list != None">
<tal:block tal:condition="python: representative_list is not None">
<ul class="ci-press-release-contact-list">
<tal:block tal:repeat="representative representative_list">
<li>
......
......@@ -28,7 +28,7 @@ Generate press release content
</tal:block>
<link rel="stylesheet" tal:attributes="href release_theme_css_url" />
<link rel="stylesheet" tal:attributes="href release_template_css_url" />
<tal:block tal:condition="python: release_css != None">
<tal:block tal:condition="python: release_css is not None">
<style type="text/css" tal:content="python: release_css"></style>
</tal:block>
</head>
......
......@@ -28,7 +28,7 @@ match_doubles = {}
for caption in re.findall('(<caption.*?>.*?</caption>)', document_content or ''):
caption_title = re.findall('<caption.*?>(.*?)</caption>', caption)[0]
if match_doubles.get(caption_title, None) == None:
if match_doubles.get(caption_title, None) is None:
match_doubles[caption_title] = caption_count
caption_relevant_count = caption_count
else:
......
......@@ -22,7 +22,7 @@ for link in re.findall('([^[]<a.*?</a>[^]])', doc_content or blank):
link_reference = None
# only internal references can be embedded
if link_reference != None and link_reference.find("http") == -1:
if link_reference is not None and link_reference.find("http") == -1:
try:
link_doc = context.restrictedTraverse(link_reference.split("?")[0])
doc_content = doc_content.replace(link, link_doc.asStrippedHTML())
......
......@@ -24,7 +24,7 @@ def getReportViaFancyName(my_report_name):
method_name = ''.join(['Base_render', report_name, 'TextDocumentReportAsHtml'])
method_call = getattr(follow_up, method_name)
if method_call != None:
if method_call is not None:
# extra curl: Coverage report requires parameter details (1|0)
if coverage_name:
......@@ -63,7 +63,7 @@ for link in re.findall('([^[]<a.*?</a>[^]])', doc_content):
if len(link_reference_list) > 0:
link_reference = link_reference_list[0]
if link_reference != None and link_reference.find("report=") > -1:
if link_reference is not None and link_reference.find("report=") > -1:
# url for report, check if report can be found.
report_name = None
......@@ -79,11 +79,11 @@ for link in re.findall('([^[]<a.*?</a>[^]])', doc_content):
else:
link_param_dict[param_key] = param_value
if report_name != None:
if report_name is not None:
target_context = document.restrictedTraverse(link_relative_url, None)
if target_context != None:
if target_context is not None:
target_caller = getattr(target_context, report_name, None)
if target_caller != None:
if target_caller is not None:
substitution_content = target_caller(**link_param_dict)
doc_content = doc_content.replace(link, substitution_content.encode("utf-8").strip())
......
......@@ -17,9 +17,9 @@ Save, download or return generated PDF Document
# doc_pdf_file pdf content to store
# doc_aggregate_list not applicable (only used for events)
if doc_save == 1:
if doc_save:
dms_module = getattr(context, 'document_module', None)
if dms_module != None:
if dms_module is not None:
document = dms_module.newContent(
portal_type="PDF",
version=doc_version,
......@@ -58,7 +58,7 @@ if doc_save == 1:
#XXX else:
# download
elif doc_download == 1:
elif doc_download:
context.REQUEST.RESPONSE.setHeader("Content-Type", "application/pdf;")
context.REQUEST.RESPONSE.setHeader("Content-Disposition", 'attachment; filename="' + doc_full_reference + '.pdf"')
......
......@@ -37,7 +37,7 @@ Update a book dialog with parameters manually entered
# display_svg format for svg images (svg, png*)
from Products.ERP5Type.Message import translateString
if dialog_id != None:
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
......
......@@ -23,7 +23,7 @@ Update a leaflet dialog with parameters manually entered
# document_save: save file in document module
from Products.ERP5Type.Message import translateString
if dialog_id != None:
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
......
......@@ -28,7 +28,7 @@ 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 != None:
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
......
......@@ -22,7 +22,7 @@ Update a press release dialog with parameters manually entered
# document_save: save file in document module
from Products.ERP5Type.Message import translateString
if dialog_id != None:
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
......
......@@ -26,7 +26,7 @@ Update the slide dialog with parameters manually entered
# display_svg: display svg-images as svg or png*
from Products.ERP5Type.Message import translateString
if dialog_id != None:
if dialog_id is not None:
return context.Base_redirect(
dialog_id,
keep_items = dict(
......
......@@ -14,14 +14,14 @@ Upgrade image for the specific type of display
import re
from zExceptions import NotFound
if img_string == None or img_string == "":
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], None)
# flag broken link until further notice
if img_obj == None:
if img_obj is None:
raise NotFound('The following image could not be found in erp5: %s' % (img_src.split("?")[0]))
img_type = img_obj.getContentType()
......@@ -33,7 +33,7 @@ if img_string.find('alt=') == -1:
# force svg display as svg or png
if img_type == "image/svg+xml":
if img_svg_format == "png" or img_svg_format == None:
if img_svg_format == "png" or img_svg_format is None:
img_string = img_string.replace('type="image/svg+xml"', '')
img_string = img_string.replace("type='image/svg+xml'", '')
img_string = img_string.replace('format=svg', 'format=png')
......
......@@ -45,31 +45,26 @@ def translateText(snip):
# -------------------------- Setup ---------------------------------------------
book = context
book_format = book.Base_setToNone(param=kw.get('format', None)) or 'html'
book_download = book.Base_setToNone(param=kw.get('document_download', None))
book_save = book.Base_setToNone(param=kw.get('document_save', None))
book_display_svg = book.Base_setToNone(param=kw.get('display_svg', None))
book_include_content_table = kw.get('include_content_table', None)
if book_include_content_table == None:
book_include_content_table = 1
else:
book_include_content_table = book.Base_setToNone(param=book_include_content_table)
book_include_history_table = book.Base_setToNone(param=kw.get('include_history_table', None))
book_include_reference_table = book.Base_setToNone(param=kw.get('include_reference_table', None))
book_include_linked_content = book.Base_setToNone(param=kw.get('include_linked_content', None))
book_include_report_content = book.Base_setToNone(param=kw.get('include_report_content', None))
override_source_person_title = kw.get('override_source_person_title', None)
override_source_organisation_title = kw.get("override_source_organisation_title", None)
override_document_description = kw.get('override_document_description', None)
override_document_short_title = kw.get('override_document_short_title', None)
override_document_title = kw.get('override_document_title', None)
override_document_version = kw.get('override_document_version', None)
override_document_reference = kw.get('override_document_reference', None)
override_logo_reference = kw.get('override_logo_reference', None)
override_batch_mode = book.Base_setToNone(param=kw.get('batch_mode', None))
book_format = kw.get('format') or 'html'
book_download = int(kw.get('document_download') or 0)
book_save = int(kw.get('document_save') or 0)
book_display_svg = kw.get('display_svg') or 'png'
book_include_content_table = int(kw.get('include_content_table') or 1)
book_include_history_table = int(kw.get('include_history_table') or 0)
book_include_reference_table = int(kw.get('include_reference_table') or 0)
book_include_linked_content = int(kw.get('include_linked_content') or 0)
book_include_report_content = int(kw.get('include_report_content') or 0)
override_source_person_title = kw.get('override_source_person_title')
override_source_organisation_title = kw.get("override_source_organisation_title")
override_document_description = kw.get('override_document_description')
override_document_short_title = kw.get('override_document_short_title')
override_document_title = kw.get('override_document_title')
override_document_version = kw.get('override_document_version')
override_document_reference = kw.get('override_document_reference')
override_logo_reference = kw.get('override_logo_reference')
override_batch_mode = kw.get('batch_mode')
# -------------------------- Document Parameters ------------------------------
book_localiser = book.getPortalObject().Localizer
......@@ -80,26 +75,26 @@ book_content = book.getTextContent()
book_aggregate_list = []
book_revision = book.getRevision()
book_modification_date = book.getModificationDate()
book_language = book.Base_setToNone(param=book.getLanguage())
book_language = book.getLanguage()
# XXX sigh for passing "" around
book_reference = html_quote(override_document_reference) if book.Base_setToNone(override_document_reference) != None else book.Base_setToNone(book.getReference())
book_short_title = html_quote(override_document_short_title) if book.Base_setToNone(override_document_short_title) != None else book.Base_setToNone(book.getShortTitle())
book_version = html_quote(override_document_version) if book.Base_setToNone(override_document_version) != None else book.Base_setToNone(book.getVersion()) or "001"
book_description = html_quote(override_document_description) if book.Base_setToNone(override_document_description) != None else book.Base_setToNone(book.getDescription())
book_title = html_quote(override_document_title) if book.Base_setToNone(override_document_title) != None else book.Base_setToNone(book.getTitle())
book_reference = html_quote(override_document_reference) if override_document_reference else book.getReference()
book_short_title = html_quote(override_document_short_title) if override_document_short_title else book.getShortTitle()
book_version = html_quote(override_document_version) if override_document_version else book.getVersion() or "001"
book_description = html_quote(override_document_description) if override_document_description else book.getDescription()
book_title = html_quote(override_document_title) if override_document_title else book.getTitle()
# override for tests
if override_batch_mode != None:
if override_batch_mode:
book_modification_date = DateTime("1976-11-04")
book_revision = "1"
book_short_date = book_modification_date.strftime('%Y-%m-%d')
if book_language != None:
if book_language and book_language != blank:
book.REQUEST['AcceptLanguage'].set(book_language, 10)
if book_language == None:
else:
book_language = blank
if book_reference == None:
if book_reference is None:
book_reference = book_prefix + book_title.replace(" ", ".")
book_full_reference = '-'.join([book_reference, book_version, book_language])
......@@ -129,21 +124,21 @@ book_table_of_content = blank
book_content.replace("${WebPage_insertTableOfReferences}", blank)
# XXX: not done
if book_include_history_table != None:
if book_include_history_table:
book_signature_list = []
book_version_list = []
book_distribution_list = []
# old generate book
if book_include_linked_content != None:
if book_include_linked_content:
book_content = book.WebPage_embedLinkedDocumentList(doc_content=book_content)
# embed reports
if book_include_report_content != None:
if book_include_report_content:
book_content = book.WebPage_embedReportDocumentList(doc_content=book_content)
# table of links
if book_include_reference_table != None:
if book_include_reference_table:
book_link_list = book.WebPage_createLinkOverview(book_content)
table_link_list = book.WebPage_createTableOverview(book_content)
image_link_list = book.WebPage_createImageOverview(book_content)
......@@ -185,7 +180,7 @@ if book_include_reference_table != None:
# table of content has to be created manually to run over everything that
# should be indexed in the toc
if book_include_content_table != None:
if book_include_content_table:
book_translated_toc_title = translateText("Table of Contents")
if book_format == "pdf":
book_table_of_content = book.WebPage_createBookXslTableOfContent(
......@@ -332,11 +327,11 @@ if book_format == "pdf":
b64encode(book.Base_convertHtmlToSingleFile(book_cover, allow_script=True)),
]
after_toc_data_list = []
if book_include_history_table != None:
if book_include_history_table:
before_toc_data_list.append(
b64encode(book.Base_convertHtmlToSingleFile(book_history, allow_script=True))
)
if book_include_reference_table != None:
if book_include_reference_table:
after_toc_data_list.append(
b64encode(book.Base_convertHtmlToSingleFile(book_references, allow_script=True))
)
......@@ -348,7 +343,7 @@ if book_format == "pdf":
encoding="utf8",
margin_top=40,
margin_bottom=20,
toc=True if book_include_content_table != None else False,
toc=True if book_include_content_table else False,
before_toc_data_list=before_toc_data_list,
xsl_style_sheet_data=b64encode(xsl_style_sheet_data),
after_toc_data_list=after_toc_data_list,
......
......@@ -37,26 +37,23 @@ def removeLegalesePlaceholders(content):
# -------------------------- Setup ---------------------------------------------
leaflet = context
leaflet_prefix = "Leaflet."
leaflet_format = kw.get('format', 'html')
leaflet_display_svg = leaflet.Base_setToNone(param=kw.get('display_svg', "png"))
leaflet_download = leaflet.Base_setToNone(param=kw.get('document_download', None))
leaflet_save = leaflet.Base_setToNone(param=kw.get('document_save', None))
leaflet_display_side = leaflet.Base_setToNone(param=kw.get('display_side', 1))
# sigh for time lost
if leaflet_display_side == '1':
leaflet_display_side = 1
leaflet_format = kw.get('format') or 'html'
leaflet_display_svg = kw.get('display_svg') or "png"
leaflet_download = int(kw.get('document_download') or 0)
leaflet_save = int(kw.get('document_save') or 0)
leaflet_display_side = int(kw.get('display_side') or 1)
override_leaflet_header_title = leaflet.Base_setToNone(param=kw.get('override_leaflet_header_title', None))
override_leaflet_header_title = kw.get('override_leaflet_header_title')
override_source_person_title = kw.get('override_source_person_title', None)
override_source_organisation_title = kw.get("override_source_organisation_title", None)
override_batch_mode = leaflet.Base_setToNone(param=kw.get('batch_mode', None))
override_batch_mode = kw.get('batch_mode')
# -------------------------- Document Parameters ------------------------------
leaflet_content = leaflet.getTextContent()
leaflet_title = leaflet.getTitle()
leaflet_relative_url = leaflet.getRelativeUrl()
leaflet_language = leaflet.Base_setToNone(param=leaflet.getLanguage())
leaflet_language = leaflet.getLanguage()
leaflet_creation_date = leaflet.getCreationDate()
leaflet_date = leaflet_creation_date.strftime('%Y-%b')
leaflet_year = leaflet_creation_date.strftime('%Y')
......@@ -66,22 +63,21 @@ leaflet_aggregate_list = []
leaflet_modification_date = leaflet.getModificationDate()
# test overrides
if override_batch_mode != None:
if override_batch_mode:
leaflet_date="Nov-1976"
leaflet_year="1976"
if leaflet_language != None: #and leaflet_format == "pdf":
if leaflet_language and leaflet_language != blank:
leaflet.REQUEST['AcceptLanguage'].set(leaflet_language, 10)
if leaflet_language == None:
else:
leaflet_language = blank
if leaflet_reference == None:
if leaflet_reference is None:
leaflet_reference = leaflet_prefix + leaflet_title.replace(" ", ".")
leaflet_full_reference = '-'.join([leaflet_reference, leaflet_version, leaflet_language])
# ---------------------------- Theme Parameters --------------------------------
leaflet_theme = leaflet.Base_getThemeDict(doc_format=leaflet_format, css_path="template_css/leaflet")
# XXX set leaflet title, but not to theme (used elsewhere, but not on leaflet)
if override_leaflet_header_title != None:
if override_leaflet_header_title and override_leaflet_header_title != blank:
leaflet_theme["theme_logo_description"] = html_quote(override_leaflet_header_title)
if leaflet_theme.get("theme").lower() == leaflet_theme.get("theme_logo_description").lower():
leaflet_theme["theme_logo_description"] = blank
......
......@@ -39,15 +39,15 @@ def removeHardcodedAbout(my_content):
# -------------------------- Setup ---------------------------------------------
release = context
release_prefix = "Release."
release_format = kw.get('format', 'html')
release_display_about = release.Base_setToNone(param=kw.get('display_about', None))
release_display_svg = release.Base_setToNone(param=kw.get('display_svg', "png"))
release_download = release.Base_setToNone(param=kw.get('document_download', None))
release_save = release.Base_setToNone(param=kw.get('document_save', None))
release_format = kw.get('format') or 'html'
release_display_about = int(kw.get('display_about') or 0)
release_display_svg = kw.get('display_svg') or "png"
release_download = int(kw.get('document_download') or 0)
release_save = int(kw.get('document_save') or 0)
override_source_person_title = kw.get('override_source_person_title', None)
override_source_organisation_title = kw.get("override_source_organisation_title", None)
override_batch_mode = release.Base_setToNone(param=kw.get('batch_mode', None))
override_batch_mode = kw.get('batch_mode')
# -------------------------- Document Parameters ------------------------------
release_content = release.getTextContent()
......@@ -66,14 +66,13 @@ release_reference = release.getReference()
release_version = release.getVersion() or "001"
# test overrides
if override_batch_mode != None:
#release_date="Nov-1976"
if override_batch_mode:
release_creation_year="1976"
if release_language != None:
if release_language is not None:
release.REQUEST['AcceptLanguage'].set(release_language, 10)
if release_language == None:
if release_language is None:
release_language = blank
if release_reference == None:
if release_reference is None:
release_reference = release_prefix + release_title.replace(" ", ".")
release_full_reference = '-'.join([release_reference, release_version, release_language])
......
......@@ -118,9 +118,9 @@ def sortContent(my_page_list):
if page_content.find("<center>") > -1:
page_tuple_first = (page_title, page_content, "first")
sort_content_list = sorted(page_content_list, key=lambda page_foo: page_foo[0])
if page_tuple_last != None:
if page_tuple_last is not None:
sort_content_list.append(page_tuple_last)
if page_tuple_first != None:
if page_tuple_first is not None:
sort_content_list = [page_tuple_first] + sort_content_list
return sort_content_list
......@@ -131,21 +131,21 @@ def sortContent(my_page_list):
doc = context
doc_prefix = "Slideshow."
doc_converted_content = None
doc_format = kw.get('format', 'html')
doc_display_notes = doc.Base_setToNone(param=kw.get('display_note', None))
doc_display_svg = doc.Base_setToNone(param=kw.get('display_svg', 'png'))
doc_download = doc.Base_setToNone(param=kw.get('document_download', None))
doc_save = doc.Base_setToNone(param=kw.get('document_save', None))
doc_ooo = doc.Base_setToNone(param=kw.get('flag_ooo', None))
doc_format = kw.get('format') or 'html'
doc_display_notes = int(kw.get('display_note') or 0)
doc_display_svg = kw.get('display_svg') or 'png'
doc_download = int(kw.get('document_download') or 0)
doc_save = int(kw.get('document_save') or 0)
doc_ooo = int(kw.get('flag_ooo') or 0)
override_logo_reference = kw.get('override_logo_reference', None)
override_source_organisation_title = kw.get("override_source_organisation_title", None)
override_batch_mode = doc.Base_setToNone(param=kw.get('batch_mode', None))
override_batch_mode = kw.get('batch_mode')
override_source_person_title = None
# ---------- backward compatability with legacy odp/sxi presentations ----------
# note: this has to come first to convert file into html and then continue
if doc_ooo != None:
if doc_ooo:
doc_portal = doc.getPortalObject()
if doc.getPortalType() in ["Presentation"]:
raw_data = doc_portal.portal_transforms.convertToData(
......@@ -154,7 +154,7 @@ if doc_ooo != None:
context=context,
mimetype=doc.getContentType()
)
if raw_data == None:
if raw_data is None:
raise ValueError("Failed to convert to %r" % "text/html")
# got something
......@@ -179,7 +179,7 @@ if doc_ooo != None:
doc_dirty_content = doc_converted_content or doc.getTextContent()
doc_content = removeEmptyDetails(doc_dirty_content)
doc_title = doc.getTitle()
doc_language = doc.Base_setToNone(param=doc.getLanguage())
doc_language = doc.getLanguage()
doc_description = doc.getDescription()
doc_creation_year = doc.getCreationDate().strftime('%Y')
doc_version = doc.getVersion() or "001"
......@@ -188,14 +188,14 @@ doc_relative_url = doc.getRelativeUrl()
doc_aggregate_list = []
doc_modification_date = doc.getModificationDate()
if override_batch_mode != None:
if override_batch_mode:
doc_version = "001"
doc_creation_year = "1976"
if doc_language != None: #and doc_format == "pdf":
if doc_language and doc_language != blank:
doc.REQUEST['AcceptLanguage'].set(doc_language, 10)
if doc_language == None:
else:
doc_language = blank
if doc_reference == None:
if doc_reference is None:
doc_reference = doc_prefix + doc_title.replace(" ", ".")
doc_full_reference = '-'.join([doc_reference, doc_version, doc_language])
......
......@@ -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=Book&amp;override_document_description=%s&amp;override_document_short_title=%s&amp;override_document_title=%s&amp;override_document_version=%s&amp;override_logo_reference=%s&amp;override_source_organisation_title=%s&amp;override_source_person_title=%s&amp;include_content_table=%s&amp;include_history_table=%s&amp;include_reference_table=%s&amp;include_linked_content=%s&amp;include_report_content=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_document_description", ""), context.REQUEST.get("override_document_short_title", ""), context.REQUEST.get("override_document_title", ""), context.REQUEST.get("override_document_version", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_source_person_title", ""),context.REQUEST.get("include_content_table", True),context.REQUEST.get("include_history_table", ""),context.REQUEST.get("include_reference_table", ""),context.REQUEST.get("include_linked_content", ""),context.REQUEST.get("include_report_content", ""), context.REQUEST.get("display_svg", ""))
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=Book&amp;override_document_description=%s&amp;override_document_short_title=%s&amp;override_document_title=%s&amp;override_document_version=%s&amp;override_logo_reference=%s&amp;override_source_organisation_title=%s&amp;override_source_person_title=%s&amp;include_content_table=%s&amp;include_history_table=%s&amp;include_reference_table=%s&amp;include_linked_content=%s&amp;include_report_content=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_document_description", ""), context.REQUEST.get("override_document_short_title", ""), context.REQUEST.get("override_document_title", ""), context.REQUEST.get("override_document_version", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_source_person_title", ""),context.REQUEST.get("include_content_table", 1), context.REQUEST.get("include_history_table", 0),context.REQUEST.get("include_reference_table", 0),context.REQUEST.get("include_linked_content", 0),context.REQUEST.get("include_report_content", 0), context.REQUEST.get("display_svg", "png"))
]]></string> </value>
</item>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>items</string>
<string>orientation</string>
<string>title</string>
......@@ -86,6 +87,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>enabled</string>
<string>items</string>
</list>
......@@ -81,6 +82,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<key> <string>default</string> </key>
<value> <int>1</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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -10,6 +10,8 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -63,6 +65,14 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Custom description to be used.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Custom reference to be used.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Custom subtitle to be used.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Custom title to be used.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Custom version to be used.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Logo to use with publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Organisation to set as publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Person to set as publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -12,6 +12,7 @@
<list>
<string>css_class</string>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -85,6 +86,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<key> <string>default</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Display leaflet side column.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>items</string>
<string>orientation</string>
<string>title</string>
......@@ -86,6 +87,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>enabled</string>
<string>items</string>
</list>
......@@ -81,6 +82,10 @@
<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>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Organisation to set as publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Person to set as publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -12,6 +12,7 @@
<list>
<string>css_class</string>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -85,6 +86,10 @@
<key> <string>default</string> </key>
<value> <string>Leaflet</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>
......
......@@ -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" 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", 0), context.REQUEST.get("display_svg", "png"))
]]></string> </value>
</item>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<key> <string>default</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Display email header.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<key> <string>default</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Display sender address in address window.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>items</string>
<string>orientation</string>
<string>title</string>
......@@ -86,6 +87,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>enabled</string>
<string>items</string>
</list>
......@@ -81,6 +82,10 @@
<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>
......
......@@ -12,6 +12,7 @@
<list>
<string>default</string>
<string>default_now</string>
<string>description</string>
<string>required</string>
<string>title</string>
</list>
......@@ -84,6 +85,10 @@
<key> <string>default_now</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Custom date to set on letter.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_date</string> </value>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Organisation to set as recipient.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Person to set as recipient.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Organisation to set as sender.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Person to set as sender.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -12,6 +12,7 @@
<list>
<string>css_class</string>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -85,6 +86,10 @@
<key> <string>default</string> </key>
<value> <string>Letter</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>
......
......@@ -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=Release&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;display_svg=%s&amp;document_save=%s&amp;display_about=%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_svg", "png"), context.REQUEST.get("document_save", ""), context.REQUEST.get("display_about"))
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=Release&amp;override_source_person_title=%s&amp;override_source_organisation_title=%s&amp;display_svg=%s&amp;display_about=%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_svg", "png"), context.REQUEST.get("display_about", 1))
]]></string> </value>
</item>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<key> <string>default</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Show auto generated about section.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>items</string>
<string>orientation</string>
<string>title</string>
......@@ -86,6 +87,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>enabled</string>
<string>items</string>
</list>
......@@ -81,6 +82,10 @@
<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>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Organisation to set as publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Person to set as publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -12,6 +12,7 @@
<list>
<string>css_class</string>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -85,6 +86,10 @@
<key> <string>default</string> </key>
<value> <string>Release</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>
......
......@@ -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>\' % (here.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;display_note=%s" name="default_version"></iframe>\' % (here.absolute_url(), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("display_svg", "png"), context.REQUEST.get("display_note", 1))
]]></string> </value>
</item>
......
......@@ -10,6 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -67,6 +68,10 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Display slideshow notes (pdf only)</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_checkbox</string> </value>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>items</string>
<string>orientation</string>
<string>title</string>
......@@ -86,6 +87,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>enabled</string>
<string>items</string>
</list>
......@@ -81,6 +82,10 @@
<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>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Logo to use with publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -205,7 +205,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
<value> <string>Organisation to set as publisher.</string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
......
......@@ -12,6 +12,7 @@
<list>
<string>css_class</string>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -85,6 +86,10 @@
<key> <string>default</string> </key>
<value> <string>Slide</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>
......
......@@ -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=Book&amp;override_document_description=%s&amp;override_document_short_title=%s&amp;override_document_title=%s&amp;override_document_version=%s&amp;override_logo_reference=%s&amp;override_source_organisation_title=%s&amp;override_source_person_title=%s&amp;include_content_table=%s&amp;include_history_table=%s&amp;include_reference_table=%s&amp;include_linked_content=%s&amp;include_report_content=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_document_description", ""), context.REQUEST.get("override_document_short_title", ""), context.REQUEST.get("override_document_title", ""), context.REQUEST.get("override_document_version", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_source_person_title", ""),context.REQUEST.get("include_content_table", True),context.REQUEST.get("include_history_table", ""),context.REQUEST.get("include_reference_table", ""),context.REQUEST.get("include_linked_content", ""),context.REQUEST.get("include_report_content", ""), context.REQUEST.get("display_svg", ""))
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=Book&amp;override_document_description=%s&amp;override_document_short_title=%s&amp;override_document_title=%s&amp;override_document_version=%s&amp;override_logo_reference=%s&amp;override_source_organisation_title=%s&amp;override_source_person_title=%s&amp;include_content_table=%s&amp;include_history_table=%s&amp;include_reference_table=%s&amp;include_linked_content=%s&amp;include_report_content=%s&amp;display_svg=%s" name="default_version"></iframe>\' % (context.absolute_url(), context.REQUEST.get("override_document_description", ""), context.REQUEST.get("override_document_short_title", ""), context.REQUEST.get("override_document_title", ""), context.REQUEST.get("override_document_version", ""), context.REQUEST.get("override_logo_reference", ""), context.REQUEST.get("override_source_organisation_title", ""), context.REQUEST.get("override_source_person_title", ""),context.REQUEST.get("include_content_table", 1), context.REQUEST.get("include_history_table", 0),context.REQUEST.get("include_reference_table", 0),context.REQUEST.get("include_linked_content", 0),context.REQUEST.get("include_report_content", 0), context.REQUEST.get("display_svg", "png"))
]]></string> </value>
</item>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>items</string>
<string>orientation</string>
<string>title</string>
......@@ -86,6 +87,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<key> <string>default</string> </key>
<value> <int>1</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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>default</string>
<string>description</string>
<string>title</string>
</list>
</value>
......@@ -76,6 +77,10 @@
<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>
......
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