Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
3258cc10
Commit
3258cc10
authored
Jun 17, 2019
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: table reference can be displayed at the place where it's defined
parent
caee2837
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_embedReportDocumentList.py
...rp5_corporate_identity/WebPage_embedReportDocumentList.py
+2
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
...ortal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
+3
-13
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_embedReportDocumentList.py
View file @
3258cc10
...
...
@@ -45,6 +45,8 @@ if (doc_content.find('${WebPage_')):
)]
substitution_list
=
re
.
findall
(
r'\
${We
bPage_(.*)}'
,
doc_content
)
for
substitution_report
in
substitution_list
:
if
substitution_report
==
'insertTableOfReferences'
:
continue
placeholder
=
''
.
join
([
'${WebPage_'
,
substitution_report
,
'}'
])
substitution_content
=
getReportViaFancyName
(
substitution_report
)
doc_content
=
doc_content
.
replace
(
placeholder
,
substitution_content
)
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
View file @
3258cc10
...
...
@@ -89,9 +89,6 @@ book_title = html_quote(override_document_title) if override_document_title else
if
isinstance
(
book_content
,
unicode
):
book_content
=
book_content
.
encode
(
"UTF-8"
)
# backcompat
book_history_section_list
=
re
.
findall
(
'<section*?>.+?</section>'
,
book_content
,
re
.
S
)
# override for tests
if
override_batch_mode
:
book_modification_date
=
DateTime
(
"1976-11-04"
)
...
...
@@ -129,9 +126,6 @@ book_image_list = []
book_table_list
=
[]
book_table_of_content
=
blank
# backcompat
book_content
=
book_content
.
replace
(
"${WebPage_insertTableOfReferences}"
,
blank
)
# XXX: not done
if
book_include_history_table
:
book_signature_list
=
[]
...
...
@@ -188,13 +182,9 @@ if book_include_reference_table:
)
#if book_format == 'html' or book_format == 'mhtml':
# book_references = book_references.encode('UTF-8').strip()
# backcompat for manual history tables at the beginning of documents
# NOTE: assumes <section>s are not used elsewhere!
if
len
(
book_history_section_list
)
>
0
:
book_content
=
book_content
.
replace
(
book_history_section_list
[
-
1
],
(
book_history_section_list
[
-
1
]
+
book_references
.
encode
(
'UTF-8'
).
strip
()))
else
:
book_content
=
book_references
.
encode
(
'UTF-8'
).
strip
()
+
book_content
book_content
=
book_content
.
replace
(
"${WebPage_insertTableOfReferences}"
,
book_references
.
encode
(
'UTF-8'
).
strip
())
else
:
book_content
=
book_content
.
replace
(
"${WebPage_insertTableOfReferences}"
,
blank
)
# table of content has to be created manually to run over everything that
# should be indexed in the toc
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment