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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
a6de8b6d
Commit
a6de8b6d
authored
Feb 09, 2022
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity&test: fix citation incorrect error
parent
3566c13f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
282 additions
and
4 deletions
+282
-4
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
...ortal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
+4
-4
bt5/erp5_corporate_identity_test/PathTemplateItem/image_module/template_test_book_citation_bmp.png
...lateItem/image_module/template_test_book_citation_bmp.png
+0
-0
bt5/erp5_corporate_identity_test/PathTemplateItem/image_module/template_test_book_citation_bmp.xml
...lateItem/image_module/template_test_book_citation_bmp.xml
+129
-0
bt5/erp5_corporate_identity_test/PathTemplateItem/web_page_module/template_test_book_citation_html.html
...tem/web_page_module/template_test_book_citation_html.html
+48
-0
bt5/erp5_corporate_identity_test/PathTemplateItem/web_page_module/template_test_book_citation_html.xml
...Item/web_page_module/template_test_book_citation_html.xml
+83
-0
bt5/erp5_corporate_identity_test/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityTemplateList.py
...components/test.erp5.testCorporateIdentityTemplateList.py
+18
-0
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
View file @
a6de8b6d
...
@@ -156,19 +156,19 @@ if book_include_reference_table:
...
@@ -156,19 +156,19 @@ if book_include_reference_table:
image_link_list
=
book
.
WebPage_createImageOverview
(
book_content
)
image_link_list
=
book
.
WebPage_createImageOverview
(
book_content
)
for
referenced_document
in
book_link_list
.
get
(
"reference_list"
,
[]):
for
referenced_document
in
book_link_list
.
get
(
"reference_list"
,
[]):
book_reference_list
.
append
(
referenced_document
.
get
(
"item"
))
book_reference_list
.
append
(
referenced_document
.
get
(
"item"
))
book_content
=
book_content
.
replace
(
referenced_document
.
get
(
"input"
),
referenced_document
.
get
(
"output"
)
,
1
)
book_content
=
book_content
.
replace
(
referenced_document
.
get
(
"input"
),
referenced_document
.
get
(
"output"
))
for
applicable_document
in
book_link_list
.
get
(
"applicable_list"
,
[]):
for
applicable_document
in
book_link_list
.
get
(
"applicable_list"
,
[]):
book_applicable_document_list
.
append
(
applicable_document
.
get
(
"item"
))
book_applicable_document_list
.
append
(
applicable_document
.
get
(
"item"
))
book_content
=
book_content
.
replace
(
applicable_document
.
get
(
"input"
),
applicable_document
.
get
(
"output"
)
,
1
)
book_content
=
book_content
.
replace
(
applicable_document
.
get
(
"input"
),
applicable_document
.
get
(
"output"
))
for
abbreviation
in
book_link_list
.
get
(
"abbreviation_list"
,
[]):
for
abbreviation
in
book_link_list
.
get
(
"abbreviation_list"
,
[]):
book_abbreviation_list
.
append
(
abbreviation
.
get
(
"item"
))
book_abbreviation_list
.
append
(
abbreviation
.
get
(
"item"
))
book_content
=
book_content
.
replace
(
abbreviation
.
get
(
"input"
),
abbreviation
.
get
(
"output"
)
,
1
)
book_content
=
book_content
.
replace
(
abbreviation
.
get
(
"input"
),
abbreviation
.
get
(
"output"
))
for
figure
in
image_link_list
.
get
(
"figure_list"
,
[]):
for
figure
in
image_link_list
.
get
(
"figure_list"
,
[]):
book_image_list
.
append
(
figure
.
get
(
"item"
))
book_image_list
.
append
(
figure
.
get
(
"item"
))
book_content
=
book_content
.
replace
(
figure
.
get
(
"input"
),
figure
.
get
(
"output"
),
1
)
book_content
=
book_content
.
replace
(
figure
.
get
(
"input"
),
figure
.
get
(
"output"
),
1
)
for
table
in
table_link_list
.
get
(
"table_list"
,
[]):
for
table
in
table_link_list
.
get
(
"table_list"
,
[]):
book_table_list
.
append
(
table
.
get
(
"item"
))
book_table_list
.
append
(
table
.
get
(
"item"
))
book_content
=
book_content
.
replace
(
table
.
get
(
"input"
),
table
.
get
(
"output"
)
,
1
)
book_content
=
book_content
.
replace
(
table
.
get
(
"input"
),
table
.
get
(
"output"
))
# in order for the reference tables to be in the table of content, they must
# in order for the reference tables to be in the table of content, they must
# be added beforehand to content
# be added beforehand to content
...
...
bt5/erp5_corporate_identity_test/PathTemplateItem/image_module/template_test_book_citation_bmp.png
0 → 100644
View file @
a6de8b6d
21 KB
bt5/erp5_corporate_identity_test/PathTemplateItem/image_module/template_test_book_citation_bmp.xml
0 → 100644
View file @
a6de8b6d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Image"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<string>
6f858aff4a47a4f505f1391940cf1eaf
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
image/png
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
842
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
template_test_book_citation_bmp
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Image
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
595
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity_test/PathTemplateItem/web_page_module/template_test_book_citation_html.html
0 → 100644
View file @
a6de8b6d
<p>
${WebPage_insertTableOfReferences}
</p>
<h1>
Test Citation
</h1>
<p>
TEST RD
</p>
<p>
Hello [
<a
href=
"http://www.nexedi.com"
title=
"Nexedi"
>
RD
</a>
]
</p>
<p>
Hello [
<a
href=
"http://www.nexedi.com"
title=
"Nexedi"
>
RD
</a>
]
</p>
<p>
Hello [
<a
href=
"http://www.nexedi.cn"
title=
"Nexedi"
>
RD
</a>
]
</p>
<table
align=
"center"
border=
"1"
cellpadding=
"1"
cellspacing=
"1"
>
<caption>
Companies, technologies and users
</caption>
<thead>
<tr>
<th
scope=
"col"
>
Company
</th>
<th
scope=
"col"
>
Country
</th>
<th
scope=
"col"
>
Technology
</th>
<th
scope=
"col"
>
Sample users
</th>
</tr>
</thead>
</table>
<table
align=
"center"
border=
"1"
cellpadding=
"1"
cellspacing=
"1"
>
<caption>
Companies, technologies and users
</caption>
<thead>
<tr>
<th
scope=
"col"
>
Company
</th>
<th
scope=
"col"
>
Country
</th>
<th
scope=
"col"
>
Technology
</th>
<th
scope=
"col"
>
Sample users
</th>
</tr>
</thead>
</table>
<table
align=
"center"
border=
"1"
cellpadding=
"1"
cellspacing=
"1"
>
<caption>
Company
</caption>
<thead>
<tr>
<th
scope=
"col"
>
Company
</th>
<th
scope=
"col"
>
Country
</th>
</tr>
</thead>
</table>
bt5/erp5_corporate_identity_test/PathTemplateItem/web_page_module/template_test_book_citation_html.xml
0 → 100644
View file @
a6de8b6d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
template_test_book_citation_html
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity_test/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityTemplateList.py
View file @
a6de8b6d
...
@@ -1644,6 +1644,24 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
...
@@ -1644,6 +1644,24 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
)
)
)
)
@
changeSkin
(
'Book'
)
def
test_pdfBookCitation
(
self
):
"""
"""
self
.
runPdfTestPattern
(
"template_test_book_citation_html"
,
"template_test_book_citation_bmp"
,
"template_test_image_source_pdf"
,
**
dict
(
page_number
=
3
,
use_skin
=
"Book"
,
test_method
=
"WebPage_exportAsBook"
,
format
=
"pdf"
,
override_revision
=
1
,
include_reference_table
=
1
)
)
@
changeSkin
(
'Book'
)
@
changeSkin
(
'Book'
)
def
test_pdfBookPrint
(
self
):
def
test_pdfBookPrint
(
self
):
"""
"""
...
...
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