diff --git a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBook.zpt b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBook.zpt index 554457214b01c20a525765d9da2beabc53597c3c..06aee0ed93c94cca5beb007a562099da9c0b0063 100644 --- a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBook.zpt +++ b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBook.zpt @@ -34,6 +34,7 @@ Generates the complete book (only called in HTML version) book_short_date python: options.get('book_short_date'); book_full_reference python: options.get('book_full_reference'); book_source_organisation_title python: options.get('book_source_organisation_title'); + margin_15mm python: options.get('margin_15mm'); book_table_of_content python: options.get('book_table_of_content');"> <!DOCTYPE html> <html tal:attributes="class python: ''.join(['ci-', book_theme, ' ci-', book_language])"> @@ -65,27 +66,53 @@ 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" /> - </tal:block> - <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:condition="python: margin_15mm"> + <body class="ci-book margin-15mm" 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" /> + </tal:block> + <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> </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 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> - </tal:block> - </body> + <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> + </tal:block> + <tal:block tal:condition="python: not margin_15mm"> + <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" /> + </tal:block> + <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> + </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> + </tal:block> </html> </tal:block> \ No newline at end of file diff --git a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.py b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.py index 5f09e08e27b5cd255633b42539fa9ac77e66252f..62804ffa999f081bd51fb3fc27a7affb623e6297 100644 --- a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.py +++ b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.py @@ -62,6 +62,7 @@ if dialog_id is not None: include_reference_table=include_reference_table, include_linked_content=include_linked_content, include_report_content=include_report_content, + margin15mm = margin15mm, #**kw ) ) diff --git a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.xml b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.xml index 6915f98e6d101e8d963903cac07a23e4145a82ed..bd6773e5a1ef6a5f1448da0f79af445f7d514989 100644 --- a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.xml +++ b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_updateBookDialog.xml @@ -50,7 +50,7 @@ </item> <item> <key> <string>_params</string> </key> - <value> <string>dialog_id=None, cancel_url=None, portal_skin=None, include_content_table=None, include_history_table= None, include_reference_table=None, include_linked_content=None, include_report_content=None, format=None,display_svg=None,document_save=None, document_download=None, transformation=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, override_document_reference=None, *args,**kw</string> </value> + <value> <string>dialog_id=None, cancel_url=None, portal_skin=None, include_content_table=None, include_history_table= None, include_reference_table=None, include_linked_content=None, include_report_content=None, margin15mm=None, format=None,display_svg=None,document_save=None, document_download=None, transformation=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, override_document_reference=None, *args,**kw</string> </value> </item> <item> <key> <string>id</string> </key> diff --git a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py index 1f703f09994f2bf401e05b15eb8e95a3a82f6f7d..62254f243b1ed48d5b29a51f082d637fb1bbbb44 100644 --- a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py +++ b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py @@ -255,6 +255,7 @@ if book_format == "html" or book_format == "mhtml": book_full_reference=book_full_reference, book_source_organisation_title=book_source.get("organisation_title") or blank, book_content=book_content, + margin_15mm = margin_15mm, book_table_of_content=book_table_of_content ) if book_format == "html": diff --git a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.css.css b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.css.css index b3a12b5bf1bfcd07a51a8e2836de975f69825c9b..ba2c6ddee7521e28238fc798d2cdfa2c3bd05f46 100644 --- a/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.css.css +++ b/bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.css.css @@ -1,3 +1,8 @@ +.margin-15mm{ + margin-left:15mm; + margin-right:15mm; +} + /* === font-size === */ .ci-book h1 + p::first-letter { font-size: 21.1667mm; /* 60pt; */ /* 80px; */ @@ -14,7 +19,7 @@ .ci-book .ci-book-header .ci-book-header-title /*, .ci-book table thead tr:first-child:nth-last-child(2) th, -.ci-book table thead tr:first-child:nth-last-child(2) td +.ci-book table thead tr:first-child:nth-last-child(2) td */ { font-size: 6.35mm; /* 18pt; */ /* 24px; */ @@ -102,6 +107,10 @@ font-style: normal; font-size: 6.35mm; /* 18pt; */ /* 24px; */ } +.ci-book p em, +.ci-book p i { + font-style: italic; +} /* === color === */ /* .ci-book a:not([href*="#"]), */ @@ -143,11 +152,11 @@ } .ci-book .custom-force-page-break, .ci-book .custom-resume { - page-break-before: always; + page-break-before: always; } -.ci-book h2, -.ci-book h3, -.ci-book h4, +.ci-book h2, +.ci-book h3, +.ci-book h4, .ci-book h5 { page-break-after: avoid; } @@ -158,7 +167,7 @@ } .ci-book table, .ci-book table caption, -.ci-book img, +.ci-book img, .ci-book tr { page-break-inside: avoid; } @@ -403,7 +412,7 @@ NOTE: logos will disappear in wkhtmltopdf if they go beyond the available space /* multi-table headers */ .ci-book table thead { - display: table-header-group; + display: table-header-group; } .ci-book table tfoot { display: table-row-group; @@ -494,7 +503,7 @@ NOTE: logos will disappear in wkhtmltopdf if they go beyond the available space background-color: #ffffff; font-weight: normal; } -.ci-book table.ci-document-page-header tbody tr td, +.ci-book table.ci-document-page-header tbody tr td, .ci-book table.ci-document-page-footer tbody tr td { /* background-color: #ffffff !important; */ /*text-align: center;*/ @@ -520,7 +529,8 @@ NOTE: logos will disappear in wkhtmltopdf if they go beyond the available space list-style: none; list-style-position: inside; } -.ci-book ul li { +.ci-book ul li, +.ci-book ol li { padding-left: 16px; text-indent: -24px; } @@ -560,13 +570,13 @@ NOTE: logos will disappear in wkhtmltopdf if they go beyond the available space .ci-book .ci-book-table-of-content + ol li ol li:before { content: counters(item, ".") " "; } -.ci-book .ci-book-table-of-content ~ h1 ~ ol > li:before, +.ci-book .ci-book-table-of-content ~ h1 ~ ol > li:before, .ci-book .ci-book-table-of-content ~ h1 ~ ol ol > li:before, -.ci-book .ci-book-table-of-content ~ h2 ~ ol > li:before, +.ci-book .ci-book-table-of-content ~ h2 ~ ol > li:before, .ci-book .ci-book-table-of-content ~ h2 ~ ol ol > li:before, -.ci-book .ci-book-table-of-content ~ h3 ~ ol > li:before, +.ci-book .ci-book-table-of-content ~ h3 ~ ol > li:before, .ci-book .ci-book-table-of-content ~ h3 ~ ol ol > li:before, -.ci-book .ci-book-table-of-content ~ h4 ~ ol > li:before, +.ci-book .ci-book-table-of-content ~ h4 ~ ol > li:before, .ci-book .ci-book-table-of-content ~ h4 ~ ol ol > li:before { counter-increment: initial; content: none;