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
Sebastien Robin
erp5
Commits
dfa60381
Commit
dfa60381
authored
Dec 30, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: just return empty page instead of crash if content is empty
parent
ee1fc0d0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
0 deletions
+13
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
...portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
+3
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
...ortal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
+2
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsContract.py
...l_skins/erp5_corporate_identity/WebPage_viewAsContract.py
+2
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
...al_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
+2
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
...al_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
+2
-0
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsSlideshow.py
..._skins/erp5_corporate_identity/WebPage_viewAsSlideshow.py
+2
-0
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
View file @
dfa60381
...
@@ -81,6 +81,9 @@ else:
...
@@ -81,6 +81,9 @@ else:
letter_version
=
"001"
letter_version
=
"001"
letter_reference
=
letter
.
getReference
()
letter_reference
=
letter
.
getReference
()
if
not
letter_content
:
return
# overrides for tests
# overrides for tests
if
override_batch_mode
:
if
override_batch_mode
:
letter_modification_date
=
DateTime
(
"1976-11-04"
)
letter_modification_date
=
DateTime
(
"1976-11-04"
)
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
View file @
dfa60381
...
@@ -69,6 +69,8 @@ book_relative_url = book.getRelativeUrl()
...
@@ -69,6 +69,8 @@ book_relative_url = book.getRelativeUrl()
book_prefix
=
pref
.
getPreferredCorporateIdentityTemplateBookDocumentPrefix
()
or
"Book."
book_prefix
=
pref
.
getPreferredCorporateIdentityTemplateBookDocumentPrefix
()
or
"Book."
book_rendering_fix
=
book
.
WebPage_getPdfOutputRenderingFix
()
or
blank
book_rendering_fix
=
book
.
WebPage_getPdfOutputRenderingFix
()
or
blank
book_content
=
book
.
getTextContent
()
book_content
=
book
.
getTextContent
()
if
not
book_content
:
return
book_aggregate_list
=
[]
book_aggregate_list
=
[]
book_revision
=
book
.
getRevision
()
book_revision
=
book
.
getRevision
()
book_modification_date
=
book
.
getModificationDate
()
book_modification_date
=
book
.
getModificationDate
()
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsContract.py
View file @
dfa60381
...
@@ -22,6 +22,8 @@ contract_relative_url = context.getRelativeUrl()
...
@@ -22,6 +22,8 @@ contract_relative_url = context.getRelativeUrl()
contract_prefix
=
'Contract.'
contract_prefix
=
'Contract.'
contract_rendering_fix
=
context
.
WebPage_getPdfOutputRenderingFix
()
or
blank
contract_rendering_fix
=
context
.
WebPage_getPdfOutputRenderingFix
()
or
blank
contract_content
=
context
.
getTextContent
()
contract_content
=
context
.
getTextContent
()
if
not
contract_content
:
return
contract_aggregate_list
=
[]
contract_aggregate_list
=
[]
contract_revision
=
context
.
getRevision
()
contract_revision
=
context
.
getRevision
()
contract_modification_date
=
context
.
getModificationDate
()
contract_modification_date
=
context
.
getModificationDate
()
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
View file @
dfa60381
...
@@ -52,6 +52,8 @@ override_batch_mode = kw.get('batch_mode')
...
@@ -52,6 +52,8 @@ override_batch_mode = kw.get('batch_mode')
# -------------------------- Document Parameters ------------------------------
# -------------------------- Document Parameters ------------------------------
leaflet_content
=
leaflet
.
getTextContent
()
leaflet_content
=
leaflet
.
getTextContent
()
if
not
leaflet_content
:
return
leaflet_title
=
leaflet
.
getTitle
()
leaflet_title
=
leaflet
.
getTitle
()
leaflet_relative_url
=
leaflet
.
getRelativeUrl
()
leaflet_relative_url
=
leaflet
.
getRelativeUrl
()
leaflet_language
=
leaflet
.
getLanguage
()
leaflet_language
=
leaflet
.
getLanguage
()
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
View file @
dfa60381
...
@@ -52,6 +52,8 @@ override_batch_mode = kw.get('batch_mode')
...
@@ -52,6 +52,8 @@ override_batch_mode = kw.get('batch_mode')
# -------------------------- Document Parameters ------------------------------
# -------------------------- Document Parameters ------------------------------
release_content
=
release
.
getTextContent
()
release_content
=
release
.
getTextContent
()
if
not
release_content
:
return
release_title
=
release
.
getTitle
()
release_title
=
release
.
getTitle
()
release_language
=
release
.
getLanguage
()
release_language
=
release
.
getLanguage
()
release_short_title
=
release
.
getShortTitle
()
release_short_title
=
release
.
getShortTitle
()
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsSlideshow.py
View file @
dfa60381
...
@@ -172,6 +172,8 @@ doc_download = int(kw.get('document_download') or 0)
...
@@ -172,6 +172,8 @@ doc_download = int(kw.get('document_download') or 0)
doc_save = int(kw.get('document_save') or 0)
doc_save = int(kw.get('document_save') or 0)
doc_ooo = kw.get('remote_content') or None
doc_ooo = kw.get('remote_content') or None
doc_content = doc_ooo or doc.getTextContent()
doc_content = doc_ooo or doc.getTextContent()
if not doc_content:
return
doc_is_slideshow = getSlideList(doc_content) or None
doc_is_slideshow = getSlideList(doc_content) or None
override_logo_reference = kw.get('override_logo_reference', None)
override_logo_reference = kw.get('override_logo_reference', None)
...
...
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