Commit 2c128efe authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: update to latest layout

parent 82caaaa0
......@@ -22,12 +22,13 @@ Export WebPage as Report
#
# display_header start headers at what level
# display_comment include comments where applicable
# display_orphan show requirements not covered by task
# display_detail include details where applicable
# display_depth level of depth to display
# display_milestone show milestones where applicable
#
# report_name report to generate
# report_title report title
# requirement_relative_url XXX sale order has no direct relation to requirement
return context.Base_viewAsReport(
format=format,
......@@ -40,10 +41,11 @@ return context.Base_viewAsReport(
display_depth=display_depth,
display_detail=display_detail,
display_comment=display_comment,
display_orphan=display_orphan,
display_header=display_header,
display_milestone=display_milestone,
report_name=report_name,
report_title=report_title,
requirement_relative_url=requirement_relative_url,
batch_mode=batch_mode,
**kw
)
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>format=None, batch_mode=None, requirement_relative_url=None, document_save=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_detail=None, display_depth=None, display_comment=None, display_header=None, report_title=None, document_title=None, report_name=None, *args,**kw</string> </value>
<value> <string>format=None, batch_mode=None, display_orphan=None, display_milestone=None, document_save=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_detail=None, display_depth=None, display_comment=None, display_header=None, report_title=None, document_title=None, report_name=None, *args,**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -17,32 +17,36 @@ from Products.PythonScripts.standard import html_quote
# ------------------------------- Set Source ----------------------------------
source_logo_url = None
default_bank_account_uid=context.Base_getTemplateParameter("default_bank_account_uid")
source_organisation = None
if source is None:
default_company_title=context.Base_getTemplateParameter("default_company_title")
contributor_title_string = blank
source_person = None
source_person_list = []
source_organisation = None
source_organisation_list = []
source_organisation_uid = None
source_set = None
# source person
# source person => override => contributor => source_decision
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 []
if len(source_person_list) == 0 and getattr(context, 'getSourceDecisionValue', None) is not None:
source_person_candidate = context.getSourceDecisionValue()
if source_person_candidate and source_person_candidate.getPortalType() == "Person":
source_person_list = [source_person_candidate]
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)
# source organisation
# order: override => follow-up => default_organisation_uid => default_company_title => source_person career subordinate
# order: override => follow-up => default_organisation_uid => default_company_title => source_person career subordinate => source decision
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)
source_organisation_list = context.Base_getTemplateProxyParameter(parameter="organisation", source_data=None) or []
if len(source_organisation_list) == 0:
source_organisation_uid = context.Base_getTemplateParameter("default_source_organisation_uid")
if source_organisation_uid:
......@@ -55,6 +59,10 @@ if source is None:
if len(organisation_candidate_list) > 0:
source_organisation_list = organisation_candidate_list
break
if len(source_organisation_list) == 0 and getattr(context, 'getSourceDecisionValue', None) is not None:
source_organisation_candidate = context.getSourceDecisionValue()
if source_organisation_candidate and source_organisation_candidate.getPortalType() == "Organisation":
source_organisation_list = [source_organisation_candidate]
if len(source_organisation_list) > 0:
source_organisation = source_organisation_list[0]
......@@ -77,6 +85,12 @@ if default_bank_account_uid is not None:
source["bic"] = override_bank_account.get("bic")
source["iban"] = override_bank_account.get("iban")
# social media
if source_organisation is not None:
source["social_media_handle_facebook"] = context.Base_getTemplateParameter('social_media_handle_facebook')
source["social_media_handle_twitter"] = context.Base_getTemplateParameter('social_media_handle_twitter')
source["social_media_handle_google"] = context.Base_getTemplateParameter('social_media_handle_google')
# social capital currency and registered court fallbacks
if source.get("social_capital_currency") is blank:
source["social_capital_currency"] = context.Base_getTemplateParameter("default_source_company_capital_currency")
......
......@@ -3,9 +3,14 @@
Return local parameters that require proxy role to access
================================================================================
"""
# parameters
# ------------------------------------------------------------------------------
# pass_parameter (portal-) type of data to fetch
# pass_source_data followup uid or context for retrieving info
# pass_flag_site whether called from a web site (no follow-up)
portal_type_valid_template_list = ["Web Site", "Web Section", "Web Page", "Letter"]
portal_type_valid_report_list = ["Project", "Sale Order", "Sale Opportunity"]
portal_type_valid_report_list = ["Project", "Sale Order", "Sale Opportunity", "Requirement Document"]
portal_type = context.getPortalType()
portal_object = context.getPortalObject()
validation_state = ('released', 'released_alive', 'published', 'published_alive',
......@@ -218,8 +223,8 @@ if pass_parameter is not None and pass_source_data is not None:
# -------------------------- Contributor -------------------------------------
# returns [{person_dict}, {person_dict...}]
if pass_parameter == "author":
if portal_type in portal_type_valid_template_list:
if pass_parameter == "author" and getattr(context, 'getContributorValueList', None):
if portal_type != "Web Section" and portal_type != "Web Site":
return populatePersonDict(context.getContributorValueList(*args, **kw))
return []
......@@ -228,7 +233,7 @@ if pass_parameter is not None and pass_source_data is not None:
if pass_parameter == "override_organisation":
return populateOrganisationDict(portal_object.portal_catalog(
portal_type="Organisation",
title=pass_source_data
title=(''.join(["=", str(pass_source_data)]))
))
# ----------------------- Sender (Override) ----------------------------------
......@@ -263,12 +268,14 @@ if pass_parameter is not None and pass_source_data is not None:
# -------------------- Organisation (Follow-Up) ------------------------------
# returns [{organisation_dict}, {organisation_dict}, ...] used in leaflet, letter, relrase
if pass_parameter == "organisation":
if pass_parameter == "organisation" and getattr(context, 'getFollowUpValueList', None):
if portal_type != "Web Site" and portal_type != "Web Section":
return populateOrganisationDict(context.getFollowUpValueList(
portal_type=pass_parameter.title(),
checked_permission='View',
follow_up_related_uid=pass_source_data
))
return []
# ---------------------- Person (Follow-Up) ----------------------------------
# returns [{person_dict} used in letter
......@@ -300,20 +307,22 @@ if pass_parameter is not None and pass_source_data is not None:
if pass_flag_site == True:
return populateProductDictFromCategoryList(
context.getWebSiteValue().getMembershipCriterionCategoryList() or []
)
) or []
elif pass_source_data is not None:
if getattr(context, 'getFollowUpValueList', None):
return populateProductDict(context.getFollowUpValueList(
portal_type=pass_parameter,
portal_type=pass_parameter.title(),
checked_permission='View',
follow_up_related_uid=pass_source_data
))
)) or []
return []
# --------------------------- Theme (Website) --------------------------------
# returns string of theme eg. "foo" or None
# tries to match theme to follow-up product
# XXX custom?
if pass_parameter == "theme":
theme = None
if portal_type == "Web Site" or portal_type == "Web Section":
pass_flag_site = True
product_candidate_list = callSelf("product", pass_source_data, pass_flag_site)
if product_candidate_list is not None:
......
......@@ -31,7 +31,7 @@ if theme is not None:
theme_logo_prefix = context.Base_getTemplateParameter("default_logo_prefix")
if theme_logo_prefix:
theme_reference = theme_logo_prefix + theme.capitalize()
theme_logo_list = context.Base_getTemplateProxyParameter(parameter="logo", source_data=theme_reference)
theme_logo_list = context.Base_getTemplateProxyParameter(parameter="logo", source_data=theme_reference) or []
if len(theme_logo_list) > 0:
theme_logo_dict = theme_logo_list[0]
if theme is None:
......
......@@ -22,12 +22,13 @@ Export WebPage as Report
#
# display_header start headers at what level
# display_comment include comments where applicable
# display_orphan show requirements which have no matching task
# display_detail include details where applicable
# display_depth level of depth to display
# display_milestone show milestones where applicable
#
# report_name report to generate
# report_title report title
# requirement_relative_url XXX sale order has no direct relation to requirement
return context.Base_viewAsReport(
format=format,
......@@ -40,10 +41,11 @@ return context.Base_viewAsReport(
display_depth=display_depth,
display_detail=display_detail,
display_comment=display_comment,
display_orphan=display_orphan,
display_header=display_header,
display_milestone=display_milestone,
report_name=report_name,
report_title=report_title,
requirement_relative_url=requirement_relative_url,
batch_mode=batch_mode,
**kw
)
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>format=\'pdf\', batch_mode=None, requirement_relative_url=None, document_save=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_header=None, display_detail=None, display_comment=None, document_title=None, display_depth=None, report_title=None, report_name=None, *args,**kw</string> </value>
<value> <string>format=\'pdf\', batch_mode=None, document_save=None, display_milestone=None, document_download=None, document_language=None, document_reference=None, document_version=None, display_header=None, display_detail=None, display_comment=None, document_title=None, display_depth=None, report_title=None, display_orphan=None, report_name=None, *args,**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -26,6 +26,8 @@ Update a book report dialog with parameters manually entered
# display_comment include comments where applicable
# display_detail include details where applicable
# display_depth level of depth to display
# display_milestone show milestones if applicable
# display_orphan show requirements not covered by task
#
# report_name report to generate
# report_title report title
......@@ -46,10 +48,12 @@ if dialog_id is not None:
document_reference=document_reference,
document_version=document_version,
document_title=document_title,
display_milestone=display_milestone,
display_depth=display_depth,
display_detail=display_detail,
display_comment=display_comment,
display_header=display_header,
display_orphan=display_orphan,
report_name=report_name,
report_title=report_title,
requirement_relative_url=requirement_relative_url,
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>dialog_id=None, cancel_url=None, requirement_relative_url=None, report_name=None, report_title=None, portal_skin=None, format=None, display_comment=None, document_title=None, document_save=None, document_download=None, document_language=None, document_version=None, document_reference=None,display_detail=None, display_depth=None, display_header=None ,*args,**kw</string> </value>
<value> <string>dialog_id=None, cancel_url=None, requirement_relative_url=None, report_name=None, report_title=None, portal_skin=None, display_milestone=None, format=None, display_comment=None, document_title=None, document_save=None, document_download=None, document_language=None, document_version=None, document_reference=None, display_orphan=None, display_detail=None, display_depth=None, display_header=None ,*args,**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -23,10 +23,12 @@ MAIN FILE: generate report (book header/footer and report content)
# display_comment include comments where applicable
# display_detail include details where applicable
# display_depth level of depth to display
# display_sandbox sandbox report for display in another html document
# display_milestone show associated milestones
# display_orphan show requirements not covered by task/item
# --------
# report_name report to generate
# report_title report title
# requirement_relative_url XXX sale order has no direct relation to requirement
from Products.PythonScripts.standard import html_quote
from base64 import b64encode
......@@ -44,6 +46,10 @@ 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)
doc_display_sandbox = int(kw.get('display_sandbox') or 0)
doc_display_embedded = int(kw.get('display_embedded') or 0)
doc_display_milestone = int(kw.get('display_milestone') or 0)
doc_display_orphan = int(kw.get('display_orphan') or 0)
override_document_title = kw.get('document_title')
override_document_version = kw.get('document_version')
......@@ -54,32 +60,36 @@ 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')
doc_embed = doc_format == 'html' and (doc_display_embedded or doc_display_sandbox)
# -------------------------- Document Parameters ------------------------------
doc_localiser = doc.getPortalObject().Localizer
doc_relative_url = doc.getRelativeUrl()
doc_rendering_fix = doc.Base_getTemplateParameter('wkhtmltopdf_rendering_fix') or blank
doc_report = getattr(doc, doc_report_name)
doc_aggregate_list = []
doc_revision = "1"
doc_modification_date = DateTime()
doc_short_date = doc_modification_date.strftime('%Y-%m-%d')
doc_language = doc.getLanguage() if getattr(doc, 'getLanguage', None) else None
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_language = html_quote(override_document_language) if override_document_language else doc_language
doc_translated_title = translateText(doc_report_title) if doc_report_title else blank
doc_content = doc_report(
display_report=True,
display_report=None if doc_embed else True,
format=doc_format,
display_depth=doc_display_depth,
display_detail=doc_display_detail,
display_header=doc_display_header or 1,
display_comment=doc_display_comment,
requirement_url=doc_requirement_relative_url,
report_title=translateText(doc_report_title)
display_sandbox=doc_display_sandbox,
display_embedded=doc_display_embedded,
display_milestone=doc_display_milestone,
display_orphan=doc_display_orphan,
report_title=doc_translated_title
)
# test overrides
......@@ -93,6 +103,7 @@ if doc_language is None:
if doc_reference == blank:
doc_reference = "Report." + doc_title.replace(" ", ".")
doc_full_reference = '-'.join([doc_reference, doc_version, doc_language])
doc_short_date = doc_modification_date.strftime('%Y-%m-%d')
# ------------------------------- Theme ----------------------------------------
doc_theme = doc.Base_getThemeDict(doc_format=doc_format, css_path="template_css/book")
......@@ -114,11 +125,14 @@ if doc_format == "html":
book_theme=doc_theme.get("theme"),
book_title=doc_title,
book_language=doc_language,
book_embed=doc_embed,
book_theme_css_font_list=doc_theme.get("theme_css_font_list"),
book_theme_css_url=doc_theme.get("theme_css_url"),
book_template_css_url=doc_theme.get("template_css_url"),
book_logo_url=doc.Base_setUrl(path=doc_source.get("enhanced_logo_url"), display=None),
book_logo_title=doc_source.get("theme_logo_description"),
book_report_css_list=doc.Base_getTemplateParameter("report_css_list") or [],
book_report_js_list=doc.Base_getTemplateParameter("report_js_list") or [],
book_short_title=doc_short_title,
book_reference=doc_reference,
book_revision=doc_revision,
......@@ -134,7 +148,6 @@ if doc_format == "html":
doc_save=doc_save,
doc_version=override_document_version or doc_version or "001",
doc_title=doc_title,
doc_relative_url=doc_relative_url,
doc_aggregate_list=doc_aggregate_list,
doc_language=doc_language,
doc_modification_date=doc_modification_date,
......@@ -154,6 +167,8 @@ if doc_format == "pdf":
book_theme_css_font_list=doc_theme.get("theme_css_font_list"),
book_theme_css_url=doc_theme.get("theme_css_url"),
book_template_css_url=doc_theme.get("template_css_url"),
book_report_css_list=doc.Base_getTemplateParameter("report_css_list") or [],
book_report_js_list=doc.Base_getTemplateParameter("report_js_list") or [],
book_content=doc_content,
)
......@@ -212,7 +227,6 @@ if doc_format == "pdf":
doc_save=doc_save,
doc_version=override_document_version or doc_version or "001",
doc_title=doc_title,
doc_relative_url=doc_relative_url,
doc_aggregate_list=doc_aggregate_list,
doc_language=doc_language,
doc_modification_date=doc_modification_date,
......
......@@ -13,6 +13,9 @@ Generates the complete book (only called in HTML version)
book_theme_css_font_list python: options.get('book_theme_css_font_list');
book_theme_css_url python: options.get('book_theme_css_url');
book_template_css_url python: options.get('book_template_css_url');
book_report_css_list python: options.get('book_report_css_list');
book_report_js_list python: options.get('book_report_js_list');
book_embed python: options.get('book_embed');
book_short_title python: options.get('book_short_title');
book_description python: options.get('book_description');
book_source_person_title python: options.get('book_source_person_title');
......@@ -43,6 +46,12 @@ Generates the complete book (only called in HTML version)
</tal:block>
<link rel="stylesheet" tal:attributes="href book_theme_css_url" />
<link rel="stylesheet" tal:attributes="href book_template_css_url" />
<link rel="stylesheet" href="template_css/highlight.css" />
<tal:block tal:condition="python: len(book_report_css_list) > 0">
<tal:block tal:repeat="css_href book_report_css_list">
<link rel="stylesheet" tal:attributes="href css_href" />
</tal:block>
</tal:block>
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
......@@ -57,6 +66,7 @@ Generates the complete book (only called in HTML version)
</script>
</head>
<body class="ci-book" onload="setPlaceholdersWithUrlParameters()">
<tal:block tal:condition="python: book_embed != 1">
<tal:block metal:use-macro="context/WebPage_createBookHeader/macros/book_header" />
<tal:block tal:condition="python: book_raw_report != True">
<tal:block metal:use-macro="context/WebPage_createBookCover/macros/book_cover" />
......@@ -65,8 +75,17 @@ Generates the complete book (only called in HTML version)
<tal:block metal:use-macro="context/WebPage_createBookTableOfHistory/macros/book_history" />
</tal:block>
<tal:block tal:replace="structure book_table_of_content"></tal:block>
</tal:block>
<tal:block metal:use-macro="context/WebPage_createBookContent/macros/book_content" />
<tal:block tal:condition="python: book_embed != 1">
<tal:block metal:use-macro="context/WebPage_createBookFooter/macros/book_footer" />
</tal:block>
<script type="text/javascript" src="template_js/highlight.js"></script>
<tal:block tal:condition="python: len(book_report_js_list) > 0">
<tal:block tal:repeat="js_src book_report_js_list">
<script type="text/javascript" tal:attributes="src js_src"></script>
</tal:block>
</tal:block>
</body>
</html>
</tal:block>
\ No newline at end of file
......@@ -11,6 +11,8 @@ Creates the Book content.
book_theme_css_font_list python: options.get('book_theme_css_font_list');
book_theme_css_url python: options.get('book_theme_css_url');
book_template_css_url python: options.get('book_template_css_url');
book_report_css_list python: options.get('book_report_css_list');
book_report_js_list python: options.get('book_report_js_list');
book_short_title python: options.get('book_short_title');
book_description python: options.get('book_description');
book_source_person_title python: options.get('book_source_person_title');
......@@ -28,9 +30,24 @@ Creates the Book content.
</tal:block>
<link rel="stylesheet" tal:attributes="href book_theme_css_url" />
<link rel="stylesheet" tal:attributes="href book_template_css_url" />
<link rel="stylesheet" href="template_css/highlight.css" />
<tal:block tal:condition="python: len(book_report_css_list) > 0">
<tal:block tal:repeat="css_href book_report_css_list">
<link rel="stylesheet" tal:attributes="href css_href" />
</tal:block>
</tal:block>
</head>
<body class="ci-book ci-book-content">
<tal:block metal:use-macro="context/WebPage_createBookContent/macros/book_content" />
<script type="text/javascript" src="template_js/highlight.js"></script>
<tal:block tal:condition="python: len(book_report_js_list) > 0">
<tal:block tal:repeat="js_src book_report_js_list">
<script type="text/javascript" tal:attributes="src js_src"></script>
</tal:block>
</tal:block>
<tal:block tal:condition="python: book_format == 'pdf'">
<tal:block tal:content="structure python: book_rendering_fix"></tal:block>
</tal:block>
</body>
</html>
</tal:block>
......@@ -38,8 +55,5 @@ Creates the Book content.
<tal:block tal:condition="python: False">
<tal:block metal:define-macro="book_content">
<tal:block tal:content="structure python: book_content"></tal:block>
<tal:block tal:condition="python: book_format == 'pdf'">
<tal:block tal:content="structure python: book_rendering_fix"></tal:block>
</tal:block>
</tal:block>
</tal:block>
\ No newline at end of file
......@@ -45,6 +45,10 @@ for citation in re.findall(r'\[(.*?)\]', document_content or ''):
citation_href = (re.findall(match_href, citation) or [""])[0]
# disregard non-links:
if citation_href == blank:
continue
# RD = Referenced Document / AD = Applicable Document
# input: bla linked document [<a href="" title="title;version;number">RD</a>]
# output: bla linked document [<a href="#RD-1">RD-1</a>]
......
......@@ -12,7 +12,8 @@ Creates the Slideshow cover section.
doc_theme_css_font_list python: options.get('doc_theme_css_font_list');
doc_theme_css_url python: options.get('doc_theme_css_url');
doc_template_css_url python: options.get('doc_template_css_url');
doc_css python: options.get('doc_css');">
doc_css python: options.get('doc_css');
doc_orientation python: options.get('doc_orientation');">
<!DOCTYPE html>
<html tal:attributes="class python: ''.join(['ci-', doc_theme, ' ci-', doc_language])">
<head>
......@@ -31,7 +32,7 @@ Creates the Slideshow cover section.
<link rel="stylesheet" tal:attributes="href doc_template_css_url" />
<style type="text/css" tal:content="doc_css"></style>
</head>
<body class="ci-slideshow">
<body tal:attributes="class python: ''.join(['ci-slideshow ', doc_orientation])">
<tal:block metal:use-macro="context/WebPage_createSlideshowCover/macros/slide_cover" />
</body>
</html>
......
......@@ -40,9 +40,9 @@ Creates the Slideshow note section.
<tal:block metal:define-macro="slide_notes">
<!--div class="reveal">
<div class="slides"-->
<section>
<!--section>
<h1 class="ci-slideshow-handout-header" i18n:translate="" i18n:domain="erp5_ui">Notes</h1>
</section>
</section-->
<tal:block tal:content="structure python: doc_notes"></tal:block>
<!--/div>
</div-->
......
......@@ -6,45 +6,75 @@ Parse a string for tables and return a list with tables information
# parameters
# ------------------------------------------------------------------------------
# document_content document content in string representation
#
# Note: also handles reports which look like tables and have a caption.
import re
def setTableCaption(my_counter, my_title):
def setTableCaption(my_counter, my_title, my_shift):
return ''.join([
'<a href="#',
my_counter,
'"></a><caption>',
'"></a>',
caption_filler[0 + my_shift],
my_counter,
' - ',
my_title,
'</caption>'
caption_filler[1 + my_shift]
])
# XXX single quotes?
caption_abbreviation = "TBL"
caption_list = []
caption_count = 1
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) is None:
match_doubles[caption_title] = caption_count
caption_relevant_count = caption_count
def digestCaption(my_caption, my_caption_title, my_count, my_shift):
if match_doubles.get(my_caption_title, None) is None:
match_doubles[my_caption_title] = my_count
caption_relevant_count = my_count
else:
caption_relevant_count = match_doubles[caption_title]
caption_relevant_count = match_doubles[my_caption_title]
caption_id = caption_abbreviation + "-" + str(caption_relevant_count)
caption_dict = {}
caption_dict["input"] = caption
caption_dict["input"] = my_caption
caption_dict["item"] = {}
caption_dict["item"]["id"] = caption_id
caption_dict["item"]["title"] = caption_title
caption_dict["item"]["title"] = my_caption_title
caption_dict["output"] = setTableCaption(
caption_id,
caption_title
my_caption_title,
my_shift
)
caption_list.append(caption_dict)
caption_count = caption_count + 1
my_count = my_count + 1
return my_count
# XXX single quotes?
caption_abbreviation = "TBL"
caption_filler = ['<caption>', '</caption>', '<div class="ci-book-caption">','</div>']
caption_list = []
caption_count = 1
match_doubles = {}
for caption in re.findall('(<caption.*?>.*?</caption>)', document_content or ''):
caption_title = re.findall('<caption.*?>(.*?)</caption>', caption)[0]
caption_count = digestCaption(caption, caption_title, caption_count, 0)
#if match_doubles.get(caption_title, None) is None:
# match_doubles[caption_title] = caption_count
# caption_relevant_count = caption_count
#else:
# caption_relevant_count = match_doubles[caption_title]
#caption_id = caption_abbreviation + "-" + str(caption_relevant_count)
#caption_dict = {}
#caption_dict["input"] = caption
#caption_dict["item"] = {}
#caption_dict["item"]["id"] = caption_id
#caption_dict["item"]["title"] = caption_title
#caption_dict["output"] = setTableCaption(
# caption_id,
# caption_title
#)
#caption_list.append(caption_dict)
#caption_count = caption_count + 1
for fake_caption in re.findall('(<div class="ci-book-caption".*?>.*?</div>)', document_content or ''):
fake_caption_title = re.findall('<div class="ci-book-caption".*?>(.*?)</div>', fake_caption)[0]
caption_count = digestCaption(fake_caption, fake_caption_title, caption_count, 2)
response_dict = {}
response_dict["table_list"] = caption_list
......
......@@ -6,6 +6,8 @@ Insert reports linked to in a document (including backcompat handling)
# parameters (* default)
# ------------------------------------------------------------------------------
# doc_content string representation of document content
# doc_language language to pass along to report for translations
# doc_format output format being generated
import re
......@@ -72,6 +74,8 @@ for link in re.findall('([^[]<a.*?</a>[^]])', doc_content):
link_relative_url = link_split[0]
link_param_list = link_split[1].replace("&amp;", "&").split("&")
link_param_dict = {}
link_param_dict["document_language"] = doc_language
link_param_dict["format"] = doc_format
for param in link_param_list:
param_key, param_value = param.split("=")
if param_key == "report":
......@@ -79,6 +83,7 @@ for link in re.findall('([^[]<a.*?</a>[^]])', doc_content):
else:
link_param_dict[param_key] = param_value
# XXX report must be callable directly and generate the full output
if report_name is not None:
target_context = document.restrictedTraverse(link_relative_url, None)
if target_context is not None:
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>doc_content=None</string> </value>
<value> <string>doc_content=None, doc_language=None, doc_format=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -111,6 +111,7 @@ book_source = book.Base_getSourceDict(
# --------------------------- Content Upgrades ---------------------------------
book_reference_list = []
book_report_css_list = book_report_js_list = []
book_applicable_document_list = []
book_abbreviation_list = []
book_signature_list = []
......@@ -135,7 +136,9 @@ if book_include_linked_content:
# embed reports
if book_include_report_content:
book_content = book.WebPage_embedReportDocumentList(doc_content=book_content)
book_report_css_list = book.Base_getTemplateParameter("report_css_list") or []
book_report_js_list = book.Base_getTemplateParameter("report_js_list") or []
book_content = book.WebPage_embedReportDocumentList(doc_content=book_content, doc_language=book_language, doc_format=book_format)
# table of links
if book_include_reference_table:
......@@ -213,6 +216,8 @@ if book_format == "html" or book_format == "mhtml":
book_theme_css_font_list=book_theme.get("theme_css_font_list"),
book_theme_css_url=book_theme.get("theme_css_url"),
book_template_css_url=book_theme.get("template_css_url"),
book_report_css_list=book_report_css_list,
book_report_js_list=book_report_js_list,
book_short_title=book_short_title,
book_description=book_description,
book_source_person_title=book_source.get("contributor_title_string").split(','),
......@@ -290,6 +295,8 @@ if book_format == "pdf":
book_theme_css_font_list=book_theme.get("theme_css_font_list"),
book_theme_css_url=book_theme.get("theme_css_url"),
book_template_css_url=book_theme.get("template_css_url"),
book_report_css_list=book_report_css_list,
book_report_js_list=book_report_js_list,
book_content=book_content,
)
book_head = book.WebPage_createBookHeader(
......
......@@ -28,6 +28,7 @@ import re
from base64 import b64encode
blank = ''
details_separator = '</section><section class="ci-notes-continue"><section><h1>cont.</h1></section>'
# ------------------ HTML cleanup/converter methods ----------------------------
def getSlideList(my_content):
......@@ -36,15 +37,33 @@ def getSlideList(my_content):
#def getSectionSlideList(my_content):
# return re.findall(r'(<section[^>]*?>.*?</section>)', my_content, re.S)
# https://regex101.com/r/8F8GTx/1/
def getSlideDetailsList(my_content):
return re.findall(r'<section.*?>\s?<section>.*?</details>\s?</section>', my_content, re.S)
def getDetails(my_content):
return my_content.find("</details>")
def getDetailsList(my_slide):
return re.findall(r'<details.*?>.*?<\/details>', my_slide, re.S)
def getNestedSection(my_content):
return my_content.find("<section") > -1
def splitMultipleDetails(my_content):
for slide in getSlideDetailsList(my_content):
detail_list = getDetailsList(slide)
detail_list_len = len(detail_list)
if detail_list_len > 1:
counter = 0
for detail in detail_list:
counter += 1
if counter < (detail_list_len):
my_content = my_content.replace(detail, ''.join([detail, details_separator]))
return my_content
def removeSlidesWithoutDetailsFromNotes(my_content):
slide_list = getSlideList(my_content)
for slide in slide_list:
for slide in getSlideList(my_content):
if getNestedSection(slide) == False:
my_content = my_content.replace(slide, blank)
content = my_content.replace('<section></section>', blank)
......@@ -178,7 +197,7 @@ if doc_ooo:
# -------------------------- Document Parameters ------------------------------
doc_dirty_content = doc_converted_content or doc.getTextContent()
doc_content = removeEmptyDetails(doc_dirty_content)
doc_title = doc.getTitle()
doc_title = doc.getShortTitle() or doc.getTitle()
doc_language = doc.getLanguage()
doc_description = doc.getDescription()
doc_creation_year = doc.getCreationDate().strftime('%Y')
......@@ -205,7 +224,7 @@ doc_css = ''.join(['.ci-slideshow-intro.present:not(.slide-background):before {'
'content: "%s";' % (doc_theme.get("theme_logo_description")),
'background: #FFF url("%s") center no-repeat;' % (doc.Base_setUrl(path=doc_theme.get("theme_logo_url"), display="medium")),
#'background-size: auto 120px;',
'background-size: auto 45% !important;',
#'background-size: auto 45% !important;',
'}'])
# ---------------------------------- Source ------------------------------------
......@@ -332,13 +351,25 @@ if doc_format == "pdf" or doc_format == "mhtml":
doc_template_css_url=doc_theme.get("template_css_url"),
doc_theme_css_font_list=doc_theme.get("theme_css_font_list"),
doc_theme_css_url=doc_theme.get("theme_css_url"),
doc_css=doc_css
doc_css=doc_css,
doc_orientation="ci-orientation-portrait" if doc_display_notes else "ci-corientation-landscape"
)
# outputting just the content requires to drop wrapping <divs> (reveal/slides)
# and add extra css to recreate the same layout. so a separate output=content
# instead of defaulting to None
doc_slideshow_content = doc.WebPage_createSlideshowContent(
# doc_slideshow_content = doc.WebPage_createSlideshowContent(
# doc_format=doc_format,
# doc_theme=doc_theme.get("theme"),
# doc_title=doc_title,
# doc_language=doc_language,
# doc_template_css_url=doc_theme.get("template_css_url"),
# doc_theme_css_font_list=doc_theme.get("theme_css_font_list"),
# doc_theme_css_url=doc_theme.get("theme_css_url"),
# doc_content=doc_content
#)
if doc_display_notes:
doc_slideshow_notes = doc.WebPage_createSlideshowNotes(
doc_format=doc_format,
doc_theme=doc_theme.get("theme"),
doc_title=doc_title,
......@@ -346,10 +377,10 @@ if doc_format == "pdf" or doc_format == "mhtml":
doc_template_css_url=doc_theme.get("template_css_url"),
doc_theme_css_font_list=doc_theme.get("theme_css_font_list"),
doc_theme_css_url=doc_theme.get("theme_css_url"),
doc_content=doc_content
doc_notes=splitMultipleDetails(removeSlidesWithoutDetailsFromNotes(doc_content)),
)
if doc_display_notes:
doc_slideshow_notes = doc.WebPage_createSlideshowNotes(
else:
doc_slideshow_content = doc.WebPage_createSlideshowContent(
doc_format=doc_format,
doc_theme=doc_theme.get("theme"),
doc_title=doc_title,
......@@ -357,12 +388,12 @@ if doc_format == "pdf" or doc_format == "mhtml":
doc_template_css_url=doc_theme.get("template_css_url"),
doc_theme_css_font_list=doc_theme.get("theme_css_font_list"),
doc_theme_css_url=doc_theme.get("theme_css_url"),
doc_notes=removeSlidesWithoutDetailsFromNotes(doc_content)
doc_content=doc_content
)
# ================ encode and build cloudoo elements =========================
footer_embedded_html_data = doc.Base_convertHtmlToSingleFile(doc_slideshow_footer, allow_script=True)
embedded_html_data = doc.Base_convertHtmlToSingleFile(doc_slideshow_content, allow_script=True)
#embedded_html_data = doc.Base_convertHtmlToSingleFile(doc_slideshow_content, allow_script=True)
before_body_data_list = [
b64encode(doc.Base_convertHtmlToSingleFile(doc_slideshow_cover, allow_script=True)),
]
......@@ -370,15 +401,19 @@ if doc_format == "pdf" or doc_format == "mhtml":
context.REQUEST.RESPONSE.setHeader("Content-Type", "text/html;")
return doc.Base_convertHtmlToSingleFile(doc_slideshow_cover, allow_script=True)
if doc_display_notes:
after_body_data_list = [
b64encode(doc.Base_convertHtmlToSingleFile(doc_slideshow_notes, allow_script=True)),
]
#after_body_data_list = [
# b64encode(doc.Base_convertHtmlToSingleFile(doc_slideshow_notes, allow_script=True)),
#]
embedded_html_data = doc.Base_convertHtmlToSingleFile(doc_slideshow_notes, allow_script=True)
after_body_data_list = []
else:
embedded_html_data = doc.Base_convertHtmlToSingleFile(doc_slideshow_content, allow_script=True)
after_body_data_list = []
#after_body_data_list = []
pdf_file = doc.Base_cloudoooDocumentConvert(embedded_html_data, "html", "pdf", conversion_kw=dict(
encoding="utf8",
orientation="landscape",
orientation= "portrait" if doc_display_notes else "landscape",
margin_top=12,
margin_bottom=20,
before_body_data_list=before_body_data_list,
......
......@@ -104,15 +104,12 @@
/* .ci-book a:not([href*="#"]), */
.ci-book a:not([id]),
.ci-book td i,
.ci-book a span,
.ci-book .ci-book-table table td[colspan] {
.ci-book a span
/*, .ci-book .ci-book-table table td[colspan]*/ {
color: #1c76bb !important;
}
.ci-book * {
color: #000 !important;
}
.ci-book code {
color: #000 !important;
color: #000 /* XXX Why? !important */;
}
.ci-book a {
text-decoration: none;
......@@ -727,7 +724,8 @@
text-align: center;
display: block;
}
.ci-book table caption {
.ci-book table caption,
.ci-book .ci-book-caption {
text-align: center;
padding-top: 4mm;
padding-bottom: 5mm;
......@@ -744,15 +742,8 @@ html .ci-book table td p {
}
/* === code boxes === */
.ci-book pre {
border: 1px solid #e0e0e0;
background-color: #fafafa;
padding: 6pt;
}
/* Cedric documentation exports */
.ci-book pre {
white-space: pre-line;
white-space: pre;
word-wrap: break-word;
max-width: 100%;
overflow-wrap: break-word;
}
......@@ -811,7 +802,8 @@ html .ci-book table td p {
text-indent: 2mm;
}
/* === reports === */
.ci-book .ci-book-table .ci-book-report-cell-left {
.ci-book .ci-book-table .ci-book-report-cell-left,
.ci-book .ci-book-table td[colspan] {
text-align: left;
}
.ci-book .ci-book-table .ci-book-report-cell-right {
......@@ -820,6 +812,10 @@ html .ci-book table td p {
/* === box items === */
/* Project Breakdown/Milestone List */
.ci-book .ci-book-box-offer,
.ci-book div.ci-book-box-offer-milestone {
width: 100%;
}
.ci-book .ci-book-box-offer,
.ci-book .ci-book-box-id,
.ci-book .ci-book-box-coverage,
.ci-book .ci-book-box-begin,
......
......@@ -34,7 +34,7 @@
.ci-book a,
.ci-book li,
.ci-book p,
.ci-book pre {
.ci-book pre code {
font-size: 5.29167mm; /* 15pt; */ /* 20px; */
}
.ci-book .ci-book-img + span,
......@@ -77,26 +77,15 @@
/* === cover === */
.ci-book .ci-book-cover p.ci-book-cover-faux-h1 {
font-family: "Roboto" !important;
font-weight: bold !important;
font-size: 12.7mm; /* 36pt; */ /* 48px; */
}
.ci-book .ci-book-cover p.ci-book-cover-faux-h2 {
font-family: "Arial";
font-weight: lighter;
font-style: normal;
font-size: 12.7mm; /* 36pt; */ /* 48px; */
}
.ci-book .ci-book-cover p.ci-book-cover-description {
font-family: "Roboto";
font-weight: lighter;
font-style: italic;
font-size: 6.35mm; /* 18pt; */ /* 24px; */
}
.ci-book .ci-book-cover p.ci-book-cover-author-list span {
font-family: "Roboto";
font-weight: lighter;
font-style: normal;
font-size: 6.35mm; /* 18pt; */ /* 24px; */
}
......@@ -104,15 +93,12 @@
/* .ci-book a:not([href*="#"]), */
.ci-book a:not([id]),
.ci-book td i,
.ci-book a span,
.ci-book .ci-book-table table td[colspan] {
.ci-book a span
/*.ci-book .ci-book-table table td[colspan]*/ {
color: #1c76bb !important;
}
.ci-book * {
color: #000 !important;
}
.ci-book code {
color: #000 !important;
color: #000 /* Why? !important*/;
}
.ci-book a {
text-decoration: none;
......@@ -159,7 +145,9 @@
.ci-book table,
.ci-book table caption,
.ci-book img,
.ci-book tr {
.ci-book tr,
.ci-book pre code,
.ci-book pre {
page-break-inside: avoid;
}
.ci-book img {
......@@ -174,6 +162,7 @@
page-break-after: avoid !important;
}
.ci-book tbody + caption,
.ci-book .ci-book-caption,
.ci-book .ci-book-img + span {
page-break-inside: avoid;
page-break-before: avoid;
......@@ -734,7 +723,8 @@
text-align: center;
display: block;
}
.ci-book table caption {
.ci-book table caption,
.ci-book .ci-book-caption {
text-align: center;
padding-top: 4mm;
padding-bottom: 5mm;
......@@ -751,18 +741,16 @@ html .ci-book table td p {
}
/* === code boxes === */
.ci-book pre {
border: 1px solid #e0e0e0;
background-color: #fafafa;
padding: 6pt;
}
/* Cedric documentation exports */
.ci-book pre {
white-space: pre-line;
white-space: pre;
word-wrap: break-word;
max-width: 100%;
overflow-wrap: break-word;
}
/*
break after 100 characters - https://stackoverflow.com/a/16756641
max-width: 40em;
max-width: 100ch;
*/
}
/* === special headers === */
/* distribution list */
.ci-book .ci-book thead th {
......@@ -828,6 +816,10 @@ html .ci-book table td p {
/* === box items === */
/* Project Breakdown/Milestone List */
.ci-book .ci-book-box-offer,
.ci-book .ci-book-box-offer-milestone {
width: 100%;
}
.ci-book .ci-book-box-offer,
.ci-book .ci-book-box-id,
.ci-book .ci-book-box-coverage,
.ci-book .ci-book-box-begin,
......
......@@ -10,13 +10,16 @@
.ci-slideshow .ci-slideshow-handout h2 {
font-size: 1.25em;
}
.ci-slideshow h1 ~ *,
.ci-slideshow h2 ~ * {
.ci-slideshow h1 ~ *:not(h2),
.ci-slideshow h2 ~ *:not(h2) {
font-size: 1em;
}
.ci-slideshow h1 ~ table {
font-size: .7em;
}
.ci-slideshow section table {
font-size: smaller;
}
html .ci-slideshow pre,
html .ci-slideshow code {
font-size: .8em;
......@@ -122,6 +125,9 @@ html .ci-slideshow .ci-slideshow-intro.present > h2 {
box-sizing: border-box;
padding-top: 6.5em;
}
.ci-slideshow-intro.present:not(.slide-background):before {
background-size: auto 45%;
}
html .ci-slideshow .ci-slideshow-intro.present + .ci-slideshow-header {
display: none;
}
......@@ -210,6 +216,10 @@ html .ci-slideshow section section *:only-child {
text-align: left;
display: inline-block;
}
.ci-slideshow section details ul,
.ci-slideshow section details ol {
display: block
}
/* margin subheader, screenshots */
.ci-slideshow section h2 + *,
.ci-slideshow section h3 + *,
......
......@@ -11,17 +11,19 @@ html {
/* === font size === */
.ci-slideshow h1,
.ci-slideshow h2,
.ci-slideshow-handout .ci-slideshow-handout-header {
.ci-slideshow h2 {
font-size: 42px;
}
.ci-slideshow h1 ~ *,
.ci-slideshow h2 ~ * {
.ci-slideshow h1 ~ *:not(h2),
.ci-slideshow h2 ~ *:not(h2) {
font-size: 28px;
}
.ci-slideshow h1 ~ table {
font-size: 14px;
}
.ci-slideshow section table {
font-size: smaller;
}
.ci-slideshow pre,
.ci-slideshow code {
font-size: 20px;
......@@ -30,11 +32,17 @@ html {
.ci-slideshow-handout h2 {
font-size: 24px;
}
.ci-slideshow details,
.ci-slideshow-handout details,
.ci-slideshow-handout ul li,
.ci-slideshow-handout ul li a,
.ci-slideshow-handout div p {
font-size: 24px;
}
.ci-slideshow .ci-slideshow-intro:before {
font-size: 28px;
}
.ci-slideshow-handout details {
font-size: 20px;
}
.ci-slideshow-footer div,
.ci-slideshow-handout section h1 ~ ul {
font-size: 16px;
......@@ -109,6 +117,9 @@ section {
overflow: hidden;
text-overflow: ellipsis;
}
.ci-slideshow-intro.present:not(.slide-background):before {
background-size: auto 45%;
}
.ci-slideshow .ci-slideshow-intro.present > h2 {
letter-spacing: normal;
text-align: center;
......@@ -211,6 +222,10 @@ html .ci-slideshow pre {
display: inline-block;
margin-top: 10%;
}
.ci-slideshow section details ul,
.ci-slideshow section details ol {
display: block
}
/* no margin after subheader, images */
.ci-slideshow section h2 + *,
.ci-slideshow section h3 + *,
......@@ -284,7 +299,8 @@ html .ci-slideshow section img + img:last-child {
page-break-before: always;
}
/* notes shrink, grayscale slide */
/* ==== notes ==== */
/*
.ci-slideshow-handout section section {
-webkit-transform:scale(0.4);
-moz-transform:scale(0.4);
......@@ -305,7 +321,7 @@ html .ci-slideshow section img + img:last-child {
text-align: center;
padding: 10mm;
}
/* details grayscale */
.ci-slideshow-handout section section * {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
......@@ -314,17 +330,17 @@ html .ci-slideshow section img + img:last-child {
filter: grayscale(100%);
filter: gray;
}
/* notes re-size header */
.ci-slideshow-handout section section h1 {
text-align: center;
-webkit-transform:scale(5);
-moz-transform:scale(5);
-ms-transform:scale(5);
transform:scale(5);
-webkit-transform:scale(2.5);
-moz-transform:scale(2.5);
-ms-transform:scale(2.5);
transform:scale(2.5);
position: relative;
top: 0;
}
.ci-slideshow-handout section {
position: relative;
}
......@@ -352,6 +368,9 @@ html .ci-slideshow section img + img:last-child {
width: 49%;
vertical-align: middle;
}
.ci-slideshow-handout section h1 ~ div img {
width: inherit;
}
.ci-slideshow-handout section h1 ~ div:only-of-type {
display: block;
margin: 0 auto;
......@@ -372,3 +391,125 @@ html .ci-slideshow section img + img:last-child {
.ci-slideshow-handout section section ol {
text-align: left;
}
*/
.ci-slideshow-handout section section {
-webkit-transform:scale(0.9);
-moz-transform:scale(0.9);
-ms-transform:scale(0.9);
transform:scale(0.9);
-webkit-transform-origin: 50% 15%;
-moz-transform-origin: 50% 15%;
-ms-transform-origin: 50% 15%;
transform-origin: 50% 15%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #a1a1a1;
display: table;
margin: 0 auto;
width: 100%;
text-align: center;
padding: 5mm;
}
.ci-slideshow-handout section section * {
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
}
.ci-slideshow-handout section section h1 {
text-align: center;
-webkit-transform:scale(1);
-moz-transform:scale(1);
-ms-transform:scale(1);
transform:scale(1);
position: relative;
top: 0;
}
.ci-slideshow-handout section * {
font-size: 10mm;
}
.ci-slideshow-handout h1,
.ci-slideshow-handout section h2,
.ci-slideshow-handout .ci-slideshow-handout-header {
font-size: 12mm;
padding: 0;
margin: 0;
}
.ci-slideshow-handout section details,
.ci-slideshow-handout section details * {
font-size: 5mm;
}
.ci-slideshow-handout section {
position: relative;
}
.ci-slideshow-handout section details {
position: absolute;
top: 93%;
}
.ci-slideshow-handout section details p:first-of-type {
margin-top: 0;
padding-top: 0;
}
.ci-slideshow-handout section h1 + img,
.ci-slideshow-handout section h1 + h2 + img {
display: block;
height: 100mm;
width: auto;
text-align: center;
margin-top: 5mm;
margin-left: auto;
margin-right: auto;
}
.ci-slideshow-handout section h1 ~ ul {
text-align: left;
display: inline-block;
}
.ci-slideshow-handout section ul {
margin-top: 0;
margin-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}
.ci-slideshow-handout section h1 ~ div {
display: inline-block;
width: 49%;
vertical-align: middle;
}
.ci-slideshow-handout section h1 ~ div img {
width: inherit;
}
.ci-slideshow-handout section h1 ~ div:only-of-type {
display: block;
margin: 0 auto;
width: auto;
}
.ci-slideshow-handout,
.ci-slideshow-handout h1,
.ci-slideshow-handout details {
color: #969696;
}
.ci-slideshow-handout section section ul,
.ci-slideshow-handout section section ol {
text-align: left;
}
.ci-slideshow-handout details > summary:first-of-type {
list-style-type: none;
}
.ci-slideshow-handout ::-webkit-details-marker {
display:none;
}
/* the big detail cover-up */
.ci-slideshow-handout details:before {
content: "";
position: absolute;
background: white;
width: 30mm;
height: 8mm;
top: 0mm;
left: 0;
}
/*
/* CUSTOMIZED to override colors */
Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar@voldmar.ru>
based on dark.css by Ivan Sagalaev
......@@ -9,8 +9,10 @@ based on dark.css by Ivan Sagalaev
display: block;
overflow-x: auto;
padding: 0.5em;
background: #3f3f3f;
color: #dcdcdc;
/* CUSTOM we do this */
/* background: #3f3f3f; */
/* color: #dcdcdc; */
/* CUSTOM END */
}
.hljs-keyword,
......
......@@ -41,9 +41,13 @@ View WebPage as Book or Report
#
# display_depth depth to report (eg sale order lines)
# display_detail show details on report
# display_sandbox embed report inside iframe
# display_embedded omit footer/header inside iframe
# display_comment show comments on report
# display_header display report header
# display_svg format for svg images (svg, png*)
# display_milestone whether to show milestones or not
# display_orphan display orphan requirements
if context.REQUEST["portal_skin"] == "Report":
return context.Base_viewAsReport(
......@@ -58,6 +62,10 @@ if context.REQUEST["portal_skin"] == "Report":
display_comment=display_comment,
display_header=display_header,
display_depth=display_depth,
display_sandbox=display_sandbox,
display_embedded=display_embedded,
display_milestone=display_milestone,
display_orphan=display_orphan,
report_name=report_name,
report_title=report_title,
requirement_relative_url=requirement_relative_url,
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>format="html", include_content_table=None, requirement_relative_url=None, display_depth=None, include_history_table= None, include_reference_table=None, include_linked_content=None, include_report_content=None, display_svg=None, display_detail=None, display_comment=None, display_header=None, document_download=None, override_document_reference=None, batch_mode=False, document_save=None, document_language=None, document_reference=None, document_version=None, transformation=None, report_title=None, document_title=None, report_name=None, override_document_description=None, override_document_short_title=None, override_document_title=None, override_document_version=None, override_logo_reference=None, override_source_organisation_title=None, override_source_person_title=None, **kw</string> </value>
<value> <string>format="html", include_content_table=None, display_orphan=None, display_milestone=None, display_embedded=None, requirement_relative_url=None, display_depth=None, include_history_table= None, include_reference_table=None, include_linked_content=None, include_report_content=None, display_svg=None, display_detail=None, display_comment=None, display_header=None, document_download=None, override_document_reference=None, batch_mode=False, document_save=None, document_language=None, document_reference=None, document_version=None, transformation=None, report_title=None, document_title=None, report_name=None, override_document_description=None, override_document_short_title=None, override_document_title=None, override_document_version=None, override_logo_reference=None, override_source_organisation_title=None, override_source_person_title=None, display_sandbox=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15949670.17</string> </value>
<value> <string>ts23973667.4</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>ffdf341f71516b863628dd4131e9c29c</string> </value>
<value> <string>bb2054b607ee9817f218e15e52789e29</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>90279</int> </value>
<value> <int>86901</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15949716.45</string> </value>
<value> <string>ts23973691.25</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>3094492538154031b86d3265e5c32a60</string> </value>
<value> <string>4c7c69526342683cdd01eb8c580e2dd1</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>161866</int> </value>
<value> <int>161904</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15949738.65</string> </value>
<value> <string>ts23973710.89</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>5f195850c47add1bedec0f02c82db7ed</string> </value>
<value> <string>090b6879eb49e5182c1101363a9018c8</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>90336</int> </value>
<value> <int>86624</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15952075.59</string> </value>
<value> <string>ts24219940.57</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>b60b61aae9418156a4e5b5c460a12a73</string> </value>
<value> <string>e081a527a4a14481a854b204dfb9e69f</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15952100.91</string> </value>
<value> <string>ts24219963.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>0d2c5412b8beb77683507da816023d7d</string> </value>
<value> <string>527ab92a98ac5c36c06c3b421e0e80cb</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>118540</int> </value>
<value> <int>115141</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15952123.1</string> </value>
<value> <string>ts24219998.56</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>83124a1c1f620789ca309a127b40cddd</string> </value>
<value> <string>7aeb14dddc4606daf750e8e5d5b364f9</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839719.22</string> </value>
<value> <string>ts24219736.6</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>4567f6466608e74c7f4b4396c59bff60</string> </value>
<value> <string>af71e66beb6943dd195610dd9a7d490f</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839736.52</string> </value>
<value> <string>ts24219753.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>71ef7a6b37564eae6fb286fc75153ba8</string> </value>
<value> <string>41e3ace41fba409cd960a8033195f24b</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839754.41</string> </value>
<value> <string>ts24219777.67</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>79c56f7f2de6db9f59eff9760f066d76</string> </value>
<value> <string>7825bf344ed5c4c48b36fd0f010d868d</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>20212</int> </value>
<value> <int>19733</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839772.21</string> </value>
<value> <string>ts24219796.65</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>4d589bd98f558be3f6b9b06c04e2ff04</string> </value>
<value> <string>83f44808946bd7de4b403b4647d3d281</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15957639.75</string> </value>
<value> <string>ts24219848.05</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>a3f2638ac25152fbb51d786468c21206</string> </value>
<value> <string>1f4ddeeaea584acb7ded363458f4f156</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15957669.93</string> </value>
<value> <string>ts24219871.79</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>078d499ee912d8a21dd108b9dc56b6bf</string> </value>
<value> <string>9077e814ba6792079b84d2e21d1820bc</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15840714.24</string> </value>
<value> <string>ts24220068.43</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>a1b420dcafa21be311890304aed73b6b</string> </value>
<value> <string>b056cab4e707f24ad4538899929b6cbd</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15840736.18</string> </value>
<value> <string>ts24220090.65</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>3fecbc1effc8d120cec20f0e073a2b8c</string> </value>
<value> <string>fe10e65e99bbede9c04fa45fdf1a1165</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>109913</int> </value>
<value> <int>109942</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839889.0</string> </value>
<value> <string>ts23978445.11</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>6c1244d467105edb50a65ede9ea488a4</string> </value>
<value> <string>3879ec0b0c1f58c41ccc3626e44c9b7a</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839925.31</string> </value>
<value> <string>ts23978485.91</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>04a1c8826c7c213cdf5bdddc0c216047</string> </value>
<value> <string>c46b41ab18fcd6902af839662acf0914</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839945.72</string> </value>
<value> <string>ts23978507.58</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>aeaf915c6b68467c5fe1828757c2f210</string> </value>
<value> <string>3085fbe4d726274917ee1bbf99c143c6</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839905.62</string> </value>
<value> <string>ts23978467.48</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>1b64e3e83f45a6131f1a2fd126f68b6f</string> </value>
<value> <string>71bcd0c501c0c172233b85d61eddf9c8</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>389080</int> </value>
<value> <int>377618</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts15839964.85</string> </value>
<value> <string>ts23978532.86</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>05765ab366c427c1404077fac1341a56</string> </value>
<value> <string>37cafef1d815c7dcc22ff218298f3757</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -125,7 +125,7 @@
</item>
<item>
<key> <string>size</string> </key>
<value> <int>390914</int> </value>
<value> <int>381449</int> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>2243af0bfbcbbdc87d2888999e7e9658</string> </value>
<value> <string>f1c12b17661ed04c34c14063905af5b4</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>cb52258daf05320138a087f0ebe5cb2f</string> </value>
<value> <string>2348166cdf1cb3d5231c20b63435b044</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>57ea75a3c526f3c84839ee29f7c70321</string> </value>
<value> <string>4ed844ec2cde6553197cd75e3929aef1</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>9ef793ae702c899a145bf3976146d369</string> </value>
<value> <string>baa58e79cb47cac9acd69e92f9ff4194</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>template_test_slideshow_input_slide_13_004_en_bmp</string> </value>
<value> <string>template_test_slideshow_input_slide_6_004_en_bmp</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......
......@@ -79,7 +79,7 @@
</item>
<item>
<key> <string>content_md5</string> </key>
<value> <string>f845a9b943c7ca21dae37406324e1f4f</string> </value>
<value> <string>33dd061d418f33c442a25181e77f6165</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -99,7 +99,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>template_test_slideshow_input_slide_8_005_de_bmp</string> </value>
<value> <string>template_test_slideshow_input_slide_7_005_de_bmp</string> </value>
</item>
<item>
<key> <string>language</string> </key>
......
......@@ -1148,10 +1148,10 @@ Note:
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_13_004_en_bmp -->
<!-- generate image - template_test_slideshow_input_slide_6_004_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_13_004_en_bmp</td>
<td>update => template_test_slideshow_input_slide_6_004_en_bmp</td>
<td></td>
</tr>
<tr>
......@@ -1166,7 +1166,7 @@ Note:
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=13&amp;doc_id=template_test_slideshow_input_slide_13_004_en_bmp</td>
<td>${screenshot_url}/Document_createScreenshot?frame=6&amp;doc_id=template_test_slideshow_input_slide_6_004_en_bmp</td>
<td></td>
</tr>
<tr>
......@@ -1412,7 +1412,7 @@ Note:
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?shot?frame=0&amp;doc_id=template_test_slideshow_input_slide_0_002_en_bmp</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_slideshow_input_slide_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
......@@ -1903,10 +1903,10 @@ Note:
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_8_005_de_bmp -->
<!-- generate image - template_test_slideshow_input_slide_7_005_de_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_8_005_de_bmp</td>
<td>update => template_test_slideshow_input_slide_7_005_de_bmp</td>
<td></td>
</tr>
<tr>
......@@ -1921,7 +1921,7 @@ Note:
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=8&amp;doc_id=template_test_slideshow_input_slide_8_005_de_bmp</td>
<td>${screenshot_url}/Document_createScreenshot?frame=7&amp;doc_id=template_test_slideshow_input_slide_7_005_de_bmp</td>
<td></td>
</tr>
<tr>
......
......@@ -125,6 +125,8 @@ specified. Reports are all custom, so if they don't exist, they will not be load
<a href="sale_order_module/template_test_sale_order?report=Base_generateRequirementCoverageReport&amp;display_comment=''">Requirement Coverage</a>
<br/>
<a href="sale_order_module/template_test_sale_order?report=Base_generateRequirementReport&amp;display_comment=''&amp;requirement_url=requirement_module/template_test_requirement_sale_order">Requirement Report</a>
<br/>
<a href="sale_order_module/template_test_sale_order?report=Base_generateGanttReport">Gantt Report</a>
<p>
There should be reports embedded above.
......
......@@ -8,6 +8,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="template_themes/themes.css" />
<link rel="stylesheet" href="template_css/book.css" />
<link rel="stylesheet" href="template_css/highlight.css" />
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
......@@ -23,6 +25,7 @@
</head>
<body class="ci-book" onload="setPlaceholdersWithUrlParameters()">
<table class="ci-book-header">
<tbody>
<tr>
......@@ -89,6 +92,7 @@
<section class="ci-book-table-of-content"><p class="ci-book-toc-faux-h1">Table of Contents</p><ol><li><div><a href="#synthese_anchor">Synthese</div></a><ol><li><div><a href="#risks-and-measures_anchor">Risks and measures</div></a><ol><li><div><a href="#risk-of-casualties-if-device-does-not-stop-and-destroys-itself_anchor">Risk of casualties if device does not stop and destroys itself</div></a></li><li><div><a href="#risk-of-killing-birds-and-polluting-the-environment_anchor">Risk of killing birds and polluting the environment</div></a></li><li><div><a href="#noise-and-vibration-levels_anchor">Noise and vibration levels</div></a></li></ol></li></ol><li><div><a href="#reports_anchor">Reports</div></a><ol><li><div><a href="#project-reports_anchor">Project Reports</div></a></li><li><div><a href="#sale-order-reports_anchor">Sale Order Reports</div></a></ol></ol></section>
<h1><a name="synthese_anchor"></a>Synthese<a class="custom-para" href=Template.Test.Book#synthese><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1>
<p>This document is a high level overview measures taken by Foo for Bar project. </p>
<p>
......@@ -216,6 +220,8 @@ specified. Reports are all custom, so if they don't exist, they will not be load
<a href="sale_order_module/template_test_sale_order?report=Base_generateRequirementCoverageReport&amp;display_comment=''">Requirement Coverage</a>
<br/>
<a href="sale_order_module/template_test_sale_order?report=Base_generateRequirementReport&amp;display_comment=''&amp;requirement_url=requirement_module/template_test_requirement_sale_order">Requirement Report</a>
<br/>
<a href="sale_order_module/template_test_sale_order?report=Base_generateGanttReport">Gantt Report</a>
<p>
There should be reports embedded above.
......@@ -235,5 +241,8 @@ There should be reports embedded above.
</tbody>
</table>
<script type="text/javascript" src="template_js/highlight.js"></script>
</body>
</html>
......@@ -8,6 +8,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="template_themes/themes.css" />
<link rel="stylesheet" href="template_css/book.css" />
<link rel="stylesheet" href="template_css/highlight.css" />
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
......@@ -23,6 +25,7 @@
</head>
<body class="ci-book" onload="setPlaceholdersWithUrlParameters()">
<table class="ci-book-header">
<tbody>
<tr>
......@@ -172,6 +175,7 @@
<section class="ci-book-table-of-content"><p class="ci-book-toc-faux-h1">Table of Contents</p><ol><li><div><a href="#introduction_anchor">Introduction</div></a><ol><li><div><a href="#references_anchor">References</div></a><ol><li><div><a href="#applicable-documents_anchor">Applicable Documents</div></a></li><li><div><a href="#referenced-documents_anchor">Referenced Documents</div></a></li></ol><li><div><a href="#abbreviations_anchor">Abbreviations</div></a></li><li><div><a href="#figures_anchor">Figures</div></a></li><li><div><a href="#tables_anchor">Tables</div></a></li></ol><li><div><a href="#synthese_anchor">Synthese</div></a><ol><li><div><a href="#risks-and-measures_anchor">Risks and measures</div></a><ol><li><div><a href="#risk-of-casualties-if-device-does-not-stop-and-destroys-itself_anchor">Risk of casualties if device does not stop and destroys itself</div></a></li><li><div><a href="#risk-of-killing-birds-and-polluting-the-environment_anchor">Risk of killing birds and polluting the environment</div></a></li><li><div><a href="#noise-and-vibration-levels_anchor">Noise and vibration levels</div></a></li></ol></li></ol><li><div><a href="#header-embedded-document_anchor">Header Embedded Document</div></a><ol><li><div><a href="#header-embedded-document-content-examples_anchor">Header Embedded Document content Examples</div></a></li></ol><li><div><a href="#reports_anchor">Reports</div></a><ol><li><div><a href="#project-reports_anchor">Project Reports</div></a></li><li><div><a href="#sale-order-reports_anchor">Sale Order Reports</div></a></ol></ol></section>
<h1><a name="introduction_anchor"></a>Introduction<a class="custom-para" href=P-XYZ-Foobar#introduction><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1>
<h2><a name="references_anchor"></a>References<a class="custom-para" href=P-XYZ-Foobar#references><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h2>
<p>This section provides the list of applicable documents and references.</p>
......@@ -455,6 +459,8 @@ specified. Reports are all custom, so if they don't exist, they will not be load
<a href="sale_order_module/template_test_sale_order?report=Base_generateRequirementCoverageReport&amp;display_comment=''">Requirement Coverage</a>
<br/>
<a href="sale_order_module/template_test_sale_order?report=Base_generateRequirementReport&amp;display_comment=''&amp;requirement_url=requirement_module/template_test_requirement_sale_order">Requirement Report</a>
<br/>
<a href="sale_order_module/template_test_sale_order?report=Base_generateGanttReport">Gantt Report</a>
<p>
There should be reports embedded above.
......@@ -474,5 +480,8 @@ There should be reports embedded above.
</tbody>
</table>
<script type="text/javascript" src="template_js/highlight.js"></script>
</body>
</html>
......@@ -8,6 +8,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="template_themes/themes.css" />
<link rel="stylesheet" href="template_css/book.css" />
<link rel="stylesheet" href="template_css/highlight.css" />
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
......@@ -23,6 +25,7 @@
</head>
<body class="ci-book" onload="setPlaceholdersWithUrlParameters()">
<table class="ci-book-header">
<tbody>
<tr>
......@@ -89,6 +92,7 @@
<section class="ci-book-table-of-content"><p class="ci-book-toc-faux-h1">Inhaltsverzeichnis</p><ol><li><div><a href="#synthese_anchor">Synthese</div></a><ol><li><div><a href="#risks-and-measures_anchor">Risks and measures</div></a><ol><li><div><a href="#risk-of-casualties-if-device-does-not-stop-and-destroys-itself_anchor">Risk of casualties if device does not stop and destroys itself</div></a></li><li><div><a href="#risk-of-killing-birds-and-polluting-the-environment_anchor">Risk of killing birds and polluting the environment</div></a></li><li><div><a href="#noise-and-vibration-levels_anchor">Noise and vibration levels</div></a></li></ol></li></ol><li><div><a href="#reports_anchor">Reports</div></a><ol><li><div><a href="#project-reports_anchor">Project Reports</div></a></li><li><div><a href="#sale-order-reports_anchor">Sale Order Reports</div></a></ol></ol></section>
<h1><a name="synthese_anchor"></a>Synthese<a class="custom-para" href=Template.Test.Book#synthese><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1>
<p>This document is a high level overview measures taken by Foo for Bar project. </p>
<p>
......@@ -235,5 +239,8 @@ There should be reports embedded above.
</tbody>
</table>
<script type="text/javascript" src="template_js/highlight.js"></script>
</body>
</html>
......@@ -10,7 +10,7 @@
<link rel="stylesheet" href="template_themes/themes.css" />
<link rel="stylesheet" href="template_css/leaflet.css" />
<style type="text/css">html .ci-leaflet #left-summary:before {background: url("None") center no-repeat;background-size: contain;}html .ci-leaflet #legalese:before {background: url("organisation_module/template_test_association/default_image?format=png") center no-repeat;background-size: contain;content: "";display: block;height: 60px;}</style>
<style type="text/css">html .ci-leaflet #left-summary:before {background: url("None") center no-repeat;background-size: contain;}html .ci-leaflet #legalese:before {background: url("template_images/fallback.png") center no-repeat;background-size: contain;content: "";display: block;height: 60px;}</style>
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
......@@ -28,7 +28,7 @@
<body class="ci-leaflet" onload="setPlaceholdersWithUrlParameters()">
<div class="ci-leaflet-header">
<p class="ci-leaflet-source-header">Test Association:Couscous</p>
<p class="ci-leaflet-source-header">Test Organisation:Couscous</p>
<p class="ci-leaflet-sheet-header">Data Sheet</p>
</div>
......@@ -39,14 +39,14 @@
<div id="legalese">
<p class="top"><span>&copy;</span><span>Test Association 1976</span></p>
<p class="top"><span>&copy;</span><span>Test Organisation 1976</span></p>
<p>
<span>Test Association</span><br />
<span>Foss Street 101</span><br />
<span>98765 Libertyville</span><br />
<span>Test Organisation</span><br />
<span>Test Drive 123</span><br />
<span>12345 Test City</span><br />
<span></span><br />
<span>info@test-assosication.eu</span><br />
<span>+190 123 123</span>
<span>info@test-organisation.eu</span><br />
<span>+123 456 789 0</span>
</p>
<p>
<span>Printed in</span>
......@@ -201,14 +201,13 @@
<div class="ci-leaflet-container-left">
<div class="ci-leaflet-footer-image-wrapper">
<img alt="Logo"
src="organisation_module/template_test_association/default_image?format=png&amp;display=thumbnail" />
<img alt="Logo" src="template_images/fallback.png" />
</div>
</div>
<div class="ci-leaflet-container-center">Template.Test.Leaflet-001-en</div>
<div class="ci-leaflet-container-right">
<span>&copy;</span><span>1976 Test Association</span>
<span>&copy;</span><span>1976 Test Organisation</span>
<br />
<span>Test Recipient</span> <span class="page"></span> | <span class="topage"></span>
</div>
......
......@@ -14,8 +14,7 @@
<div class="ci-letter-header">
<div class="ci-letter-bar">
<div class="ci-letter-bar-logo">
<img src="organisation_module/template_test_association/default_image?format=png&amp;display=thumbnail"
alt="" />
<img src="template_images/fallback.png" alt="" />
<span></span>
</div>
<div class="ci-letter-bar-purporse"><span></span></div>
......@@ -57,10 +56,10 @@
<tr>
<td></td>
<td class="ci-letter-destination">
<span>Test Association</span>
<span>Test Organisation</span>
<span>Test Association Member</span>
<span>Foss Street 101</span>
<span>98765 Libertyville</span>
<span>Test Drive 123</span>
<span>12345 Test City</span>
<span> </span>
</td>
<td></td>
......@@ -126,17 +125,17 @@ Feel free to call me back in case you have further questions (01-23-456789-0).
<tr>
<td>
<div>
<span class="ci-letter-footer-title">Address</span><span>Test Association</span>
<span class="ci-letter-footer-title">&nbsp;</span><span>Foss Street 101</span>
<span class="ci-letter-footer-title">&nbsp;</span><span>98765 Libertyville</span>
<span class="ci-letter-footer-title">Address</span><span>Test Organisation</span>
<span class="ci-letter-footer-title">&nbsp;</span><span>Test Drive 123</span>
<span class="ci-letter-footer-title">&nbsp;</span><span>12345 Test City</span>
<span class="ci-letter-footer-title">&nbsp;</span><span></span>
</div>
</td>
<td>
<div>
<span class="ci-letter-footer-title">Telephone</span><span>+190 123 123</span>
<span class="ci-letter-footer-title">Telephone</span><span>+123 456 789 0</span>
<span class="ci-letter-footer-title">Telefax</span><span></span>
<span class="ci-letter-footer-title">Email</span><span>info@test-assosication.eu</span>
<span class="ci-letter-footer-title">Email</span><span>info@test-organisation.eu</span>
<span class="ci-letter-footer-title">Web Address</span><span></span>
</div>
</td>
......
......@@ -28,7 +28,7 @@
<body class="ci-press-release" onload="setPlaceholdersWithUrlParameters()">
<div class="ci-press-release-page-header">
<p class="ci-press-release-page-header-source-header">Test Association: </p>
<p class="ci-press-release-page-header-source-header">Test Organisation: </p>
<p class="ci-press-release-page-header-release-header">Pressemeldung</p>
</div>
......@@ -73,7 +73,7 @@
<div class="ci-press-release-container ci-press-release-container-center">Template.Test.Release-002-de</div>
<div class="ci-press-release-container ci-press-release-container-right">
<span>&copy;</span>
<span>1976 Test Association</span><br />
<span>1976 Test Organisation</span><br />
<span>Test Association Member</span>
<span class="page"></span> | <span class="topage"></span>
</div>
......
......@@ -22,7 +22,7 @@
<li>Content</li>
</ul>
<details open="open">
This is a sample image in png format rendered as png.
<p>This is a sample image in png format rendered as png.</p>
</details>
</section>
......@@ -30,7 +30,7 @@
<h1>Test PNG as SVG</h1>
<img src="Template.Test.Illustration.Reach?format=svg" type="image/svg+xml" alt="" />
<details open="open">
This is a sample image in svg format, not converted.
<p>This is a sample image in svg format, not converted.</p>
</details>
</section>
......@@ -41,7 +41,7 @@
<span>Photo by<a target="_blank" href="">Someone</a>&nbsp;/&nbsp;<a target="_blank" href="">Source</a></span>
</div>
<details open="open">
This is a sample image in svg format, rendered as png. With Attribution
<p>This is a sample image in svg format, rendered as png. With Attribution</p>
</details>
</section>
......@@ -73,7 +73,9 @@
<ul>
<li>Content</li>
</ul>
<details open="open">This is a sample graphic generated in HTML.</details>
<details open="open">
<p>This is a sample graphic generated in HTML.</p>
</details>
</section>
<section class="master">
......@@ -90,9 +92,23 @@
</ul>
</div>
<details open="open">
<p>This is a side by side content slide with multiple details subslides.</p>
<p>This is a side by side content slide with multiple details subslides. With <a href="">link</a></p>
</details>
<details>
<details open="open">
This is the second detail subslide.
</details>
<details open="open">
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
<p>Lot of text</p>
</details>
</section>
......@@ -85,9 +85,7 @@
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<value> <string>Same slideshow description</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -14,7 +14,7 @@
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" href="template_themes/themes.css" />
<link rel="stylesheet" href="template_css/slide.css" />
<style type="text/css">.ci-slideshow-intro.present:not(.slide-background):before {content: "";background: #FFF url("template_images/fallback.png") center no-repeat;background-size: auto 45% !important;}</style>
<style type="text/css">.ci-slideshow-intro.present:not(.slide-background):before {content: "";background: #FFF url("template_images/fallback.png") center no-repeat;}</style>
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
......
......@@ -14,7 +14,7 @@
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" href="template_themes/themes.css" />
<link rel="stylesheet" href="template_css/slide.css" />
<style type="text/css">.ci-slideshow-intro.present:not(.slide-background):before {content: "";background: #FFF url("template_images/fallback.png") center no-repeat;background-size: auto 45% !important;}</style>
<style type="text/css">.ci-slideshow-intro.present:not(.slide-background):before {content: "";background: #FFF url("template_images/fallback.png") center no-repeat;}</style>
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
......
......@@ -14,7 +14,7 @@
<link rel="stylesheet" href="template_css/zenburn.css" />
<link rel="stylesheet" href="template_themes/themes.css" />
<link rel="stylesheet" href="template_css/slide.css" />
<style type="text/css">.ci-slideshow-intro.present:not(.slide-background):before {content: "";background: #FFF url("template_images/fallback.png") center no-repeat;background-size: auto 45% !important;}</style>
<style type="text/css">.ci-slideshow-intro.present:not(.slide-background):before {content: "";background: #FFF url("template_images/fallback.png") center no-repeat;}</style>
<script type="text/javascript">
function setPlaceholdersWithUrlParameters() {
var vars={};
......
......@@ -52,7 +52,7 @@ def changeSkin(skin_name):
return wrapped
return decorator
class TestCorporateIdentityTemplates(ERP5TypeTestCase):
class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
def getTitle(self):
return "Test ERP5 Corporate Identity templates."
......@@ -94,13 +94,15 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
self.portal.portal_preferences.default_nexedi_system_preference.enable()
self.tic()
def createTestEvent(self, target_language):
def createTestEvent(self, target_language, source_relative_url, destination_relative_url):
test_event = self.portal.event_module.newContent(
portal_type="Letter",
language=target_language,
content_type="text/html",
text_content="Hello",
title="Test"
title="Test",
source=source_relative_url,
destination=destination_relative_url,
)
return test_event
......@@ -245,7 +247,15 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
kw["batch_mode"] = 1
if id1 == None:
test_page = self.createTestEvent(target_language)
# overrides are not set explicitly in Event-base letters
# source and destination are selectedable, so the desired
# values must be passed
test_page = self.createTestEvent(
target_language,
kw["source_relative_url"],
kw["destination_relative_url"]
)
self.tic()
else:
test_page = getattr(self.portal.web_page_module, id1)
......@@ -422,10 +432,10 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
"""
self.runPdfTestPattern(
"template_test_slideshow_input_001_en_html",
"template_test_slideshow_input_slide_13_004_en_bmp",
"template_test_slideshow_input_slide_6_004_en_bmp",
"template_test_slideshow_input_004_en_pdf",
**dict(
page_number=13,
page_number=6,
display_note=1,
use_skin="Slide",
test_method="WebPage_exportAsSlideshow",
......@@ -536,10 +546,10 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
"""
self.runPdfTestPattern(
"template_test_slideshow_input_003_de_html",
"template_test_slideshow_input_slide_8_005_de_bmp",
"template_test_slideshow_input_slide_7_005_de_bmp",
"template_test_slideshow_input_005_de_pdf",
**dict(
page_number=8,
page_number=7,
display_note=1,
lang="de",
test_method="WebPage_exportAsSlideshow",
......@@ -717,8 +727,10 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
test_method="Letter_send",
format="pdf",
use_skin="Letter",
override_source_organisation_title="Test Organisation",
override_destination_organisation_title="Test Organisation",
#override_source_organisation_title="Test Organisation",
#override_destination_organisation_title="Test Organisation",
source_relative_url="organisation_module/template_test_organisation",
destination_relative_url="organisation_module/template_test_organisation",
subfield_field_override_date_year="1999",
subfield_field_override_date_month="12",
subfield_field_override_date_day="31"
......@@ -742,8 +754,10 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
test_method="Letter_send",
format="pdf",
use_skin="Letter",
override_source_person_title="Test Unassociated Member",
override_destination_person_title="Test Unassociated Member",
#override_source_person_title="Test Unassociated Member",
#override_destination_person_title="Test Unassociated Member",
source_relative_url="person_module/template_test_no_member",
destination_relative_url="person_module/template_test_no_member",
subfield_field_override_date_year="1999",
subfield_field_override_date_month="12",
subfield_field_override_date_day="31"
......
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