Commit 9d154971 authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity: allow to dump slideshow cover for tests

parent 53b1792a
...@@ -271,7 +271,7 @@ if getDetails(doc_content) > -1: ...@@ -271,7 +271,7 @@ if getDetails(doc_content) > -1:
doc_content = doc_content.replace(slide, details) doc_content = doc_content.replace(slide, details)
# ======================== Format: html/mhtml ================================== # ======================== Format: html/mhtml ==================================
if doc_format == "html" or doc_format == "mhtml": if doc_format == "html": #or doc_format == "mhtml":
doc_output = doc.WebPage_createSlideshow( doc_output = doc.WebPage_createSlideshow(
doc_format=doc_format, doc_format=doc_format,
doc_theme=doc_theme.get("theme"), doc_theme=doc_theme.get("theme"),
...@@ -309,7 +309,7 @@ if doc_format == "html" or doc_format == "mhtml": ...@@ -309,7 +309,7 @@ if doc_format == "html" or doc_format == "mhtml":
return doc.Base_convertHtmlToSingleFile(doc_output, allow_script=True) return doc.Base_convertHtmlToSingleFile(doc_output, allow_script=True)
# ============================= Format: pdf ==================================== # ============================= Format: pdf ====================================
if doc_format == "pdf": if doc_format == "pdf" or doc_format == "mhtml":
doc_slideshow_footer = doc.WebPage_createSlideshowFooter( doc_slideshow_footer = doc.WebPage_createSlideshowFooter(
doc_format=doc_format, doc_format=doc_format,
doc_theme=doc_theme.get("theme"), doc_theme=doc_theme.get("theme"),
...@@ -368,6 +368,9 @@ if doc_format == "pdf": ...@@ -368,6 +368,9 @@ if doc_format == "pdf":
before_body_data_list = [ before_body_data_list = [
b64encode(doc.Base_convertHtmlToSingleFile(doc_slideshow_cover, allow_script=True)), b64encode(doc.Base_convertHtmlToSingleFile(doc_slideshow_cover, allow_script=True)),
] ]
if 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: if doc_display_notes:
after_body_data_list = [ after_body_data_list = [
b64encode(doc.Base_convertHtmlToSingleFile(doc_slideshow_notes, allow_script=True)), b64encode(doc.Base_convertHtmlToSingleFile(doc_slideshow_notes, allow_script=True)),
......
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