Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
6b343fc6
Commit
6b343fc6
authored
Dec 12, 2017
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: add back previously corrupt pdf, fixes for tests
parent
e5e197df
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
327 additions
and
4 deletions
+327
-4
bt5/erp5_corporate_identity/PathTemplateItem/document_module/template_test_leaflet_input_001_en_pdf.pdf
...ocument_module/template_test_leaflet_input_001_en_pdf.pdf
+0
-0
bt5/erp5_corporate_identity/PathTemplateItem/document_module/template_test_leaflet_input_001_en_pdf.xml
...ocument_module/template_test_leaflet_input_001_en_pdf.xml
+315
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Document_createScreenshot.py
...kins/erp5_corporate_identity/Document_createScreenshot.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createLinkOverview.py
...ins/erp5_corporate_identity/WebPage_createLinkOverview.py
+5
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_leaflet/WebPage_viewAsLeaflet.py
.../erp5_corporate_identity_leaflet/WebPage_viewAsLeaflet.py
+4
-1
bt5/erp5_corporate_identity/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityTemplates.py
...al_components/test.erp5.testCorporateIdentityTemplates.py
+2
-2
No files found.
bt5/erp5_corporate_identity/PathTemplateItem/document_module/template_test_leaflet_input_001_en_pdf.pdf
0 → 100644
View file @
6b343fc6
File added
bt5/erp5_corporate_identity/PathTemplateItem/document_module/template_test_leaflet_input_001_en_pdf.xml
0 → 100644
View file @
6b343fc6
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PDF"
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>
_EtagSupport__etag
</string>
</key>
<value>
<string>
ts13099734.13
</string>
</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>
8e05f3583b1404fc2b3c2c1abc3a9ce4
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/pdf
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
Template.Test.Leaflet
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
test leaflet without anything set.
</string>
</value>
</item>
<item>
<key>
<string>
filename
</string>
</key>
<value>
<string>
Template.Test.Leaflet-001-en.pdf
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
-1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
template_test_leaflet_input_001_en_pdf
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
PDF
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
115071
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Template Test Leaflet
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
-1
</int>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</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>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAY=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAc=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"6"
aka=
"AAAAAAAAAAY="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1513099714.29
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
draft
</string>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
<record
id=
"7"
aka=
"AAAAAAAAAAc="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
964.5784.49253.4488
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1513099734.14
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</tuple>
</pickle>
</record>
</ZopeData>
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Document_createScreenshot.py
View file @
6b343fc6
...
...
@@ -2,7 +2,7 @@ if id is None:
return
"Failed. Missing image id."
if
context
.
getPortalType
()
!=
"PDF"
:
return
"Failed. Not a pdf."
if
context
.
getId
().
find
(
"template_
test
"
)
==
-
1
:
if
context
.
getId
().
find
(
"template_"
)
==
-
1
:
return
"Failed. Not a template test item."
pdf_page
=
context
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createLinkOverview.py
View file @
6b343fc6
...
...
@@ -34,6 +34,11 @@ citation_ad_doubles = {}
citation_rd_doubles
=
{}
for
citation
in
re
.
findall
(
'
\
[(.*?)
\
]'
,
document_content
or
''
):
# disregard empty brackets
if
citation
==
blank
:
continue
citation_href
=
(
re
.
findall
(
match_href
,
citation
)
or
[
""
])[
0
]
# RD = Referenced Document / AD = Applicable Document
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity_leaflet/WebPage_viewAsLeaflet.py
View file @
6b343fc6
...
...
@@ -84,7 +84,7 @@ leaflet_display_svg = setToNone(kw.get('display_svg', "png"))
leaflet_download
=
setToNone
(
kw
.
get
(
'document_download'
,
None
))
leaflet_save
=
setToNone
(
kw
.
get
(
'document_save'
,
None
))
override_leaflet_header_title
=
kw
.
get
(
'override_leaflet_header_title'
,
None
)
override_leaflet_header_title
=
setToNone
(
kw
.
get
(
'override_leaflet_header_title'
,
None
)
)
override_source_person_title
=
kw
.
get
(
'override_source_person_title'
,
None
)
override_source_organisation_title
=
kw
.
get
(
"override_source_organisation_title"
,
...
...
@@ -126,8 +126,11 @@ leaflet_theme = leaflet.Base_getThemeDict(
url
=
leaflet_url
,
css_path
=
"/leaflet_css/leaflet"
)
# set leaflet title, but not to theme (used elsewhere, but not on leaflet)
if
override_leaflet_header_title
is
not
None
:
leaflet_theme
[
"theme_logo_description"
]
=
html_quote
(
override_leaflet_header_title
)
if
leaflet_theme
.
get
(
"theme"
).
lower
()
==
leaflet_theme
.
get
(
"theme_logo_description"
).
lower
():
leaflet_theme
[
"theme_logo_description"
]
=
blank
leaflet_recycle_url
=
''
.
join
([
leaflet_url
,
"/leaflet_img/recycle.png?portal_skin=Leaflet"
])
leaflet_css
=
''
.
join
([
'html .ci-leaflet #left-summary:before {'
,
...
...
bt5/erp5_corporate_identity/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityTemplates.py
View file @
6b343fc6
...
...
@@ -230,7 +230,7 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
"""
test_page
=
getattr
(
self
.
portal
.
web_page_module
,
id1
)
expected_page
=
getattr
(
self
.
portal
.
web_page_module
,
id2
)
dump
=
getattr
(
self
.
portal
,
'dump_data'
)
dump
=
getattr
(
self
.
portal
,
'dump_data'
,
None
)
kw
[
"override_date"
]
=
kw
.
get
(
"override_date"
,
test_page
.
getModificationDate
())
html
=
getattr
(
test_page
,
kw
.
get
(
"test_method"
))(
portal_skin
=
kw
.
get
(
"use_skin"
),
**
kw
)
...
...
@@ -248,7 +248,7 @@ class TestCorporateIdentityTemplates(ERP5TypeTestCase):
test_page
=
getattr
(
self
.
portal
.
web_page_module
,
id1
)
expected_image
=
getattr
(
self
.
portal
.
image_module
,
id2
)
image_source_pdf_doc
=
getattr
(
self
.
portal
.
document_module
,
id3
)
dump
=
getattr
(
self
.
portal
,
'dump_data'
)
dump
=
getattr
(
self
.
portal
,
'dump_data'
,
None
)
kw
[
"override_date"
]
=
kw
.
get
(
"override_date"
,
test_page
.
getModificationDate
())
pdf_kw
=
dict
(
...
...
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