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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
c94060b9
Commit
c94060b9
authored
Sep 13, 2018
by
Sven Franck
Committed by
Tristan Cavelier
Sep 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: pass skin for custom theme parameter lookup
parent
0e73e571
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
9 deletions
+17
-9
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getThemeDict.py
...portal_skins/erp5_corporate_identity/Base_getThemeDict.py
+10
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getThemeDict.xml
...ortal_skins/erp5_corporate_identity/Base_getThemeDict.xml
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
...portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
...portal_skins/erp5_corporate_identity/Base_viewAsReport.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
...ortal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
...al_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
+1
-2
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
...al_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
+1
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsSlideshow.py
..._skins/erp5_corporate_identity/WebPage_viewAsSlideshow.py
+1
-1
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getThemeDict.py
View file @
c94060b9
...
...
@@ -18,6 +18,11 @@ css = "default_theme_css_url"
font
=
"default_theme_font_css_url_list"
param
=
"?format=png"
# theme content might not be visible on the default View
lookup_skin
=
blank
if
skin
:
lookup_skin
=
"?portal_skin="
+
skin
theme_logo_list
=
[]
theme_logo_dict
=
{}
theme_reference
=
None
...
...
@@ -49,5 +54,9 @@ theme_dict["theme_css_font_list"] = []
theme_font_list
=
context
.
Base_getTemplateParameter
(
font
)
or
[]
for
font
in
theme_font_list
:
theme_dict
[
"theme_css_font_list"
].
append
(
font
+
pdf
)
theme_dict
[
"theme_css_url"
]
=
context
.
Base_getTemplateParameter
(
css
)
or
context
.
Base_getTemplateParameter
(
css
)
or
blank
theme_css_url
=
context
.
Base_getTemplateParameter
(
css
)
if
theme_css_url
:
theme_dict
[
"theme_css_url"
]
=
context
.
Base_getTemplateParameter
(
css
)
+
lookup_skin
else
:
theme_dict
[
"theme_css_url"
]
=
blank
return
theme_dict
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_getThemeDict.xml
View file @
c94060b9
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
doc_format=None, css_path=None
</string>
</value>
<value>
<string>
doc_format=None, css_path=None
, skin=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsLetter.py
View file @
c94060b9
...
...
@@ -90,7 +90,7 @@ if letter_reference is None:
letter_full_reference
=
'-'
.
join
([
letter_reference
,
letter_version
,
letter_language
])
# --------------------------- Layout Parameters --------------------------------
letter_theme
=
letter
.
Base_getThemeDict
(
doc_format
=
letter_format
,
css_path
=
"template_css/letter"
)
letter_theme
=
letter
.
Base_getThemeDict
(
doc_format
=
letter_format
,
css_path
=
"template_css/letter"
,
skin
=
"Letter"
)
# --------------------------- Source/Destination -------------------------------
letter_source
=
letter
.
Base_getSourceDict
(
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/Base_viewAsReport.py
View file @
c94060b9
...
...
@@ -129,7 +129,7 @@ doc_full_reference = '-'.join([doc_reference, doc_version, doc_language])
doc_short_date
=
doc_modification_date
.
strftime
(
'%Y-%m-%d'
)
# ------------------------------- Theme ----------------------------------------
doc_theme
=
doc
.
Base_getThemeDict
(
doc_format
=
doc_format
,
css_path
=
"template_css/book"
)
doc_theme
=
doc
.
Base_getThemeDict
(
doc_format
=
doc_format
,
css_path
=
"template_css/book"
,
skin
=
"Book"
)
# --------------------------- Source/Destination -------------------------------
doc_source
=
doc
.
Base_getSourceDict
(
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
View file @
c94060b9
...
...
@@ -106,7 +106,7 @@ if book_reference is None:
book_full_reference
=
'-'
.
join
([
book_reference
,
book_version
,
book_language
])
# ------------------------------- Theme ----------------------------------------
book_theme
=
book
.
Base_getThemeDict
(
doc_format
=
book_format
,
css_path
=
"template_css/book"
)
book_theme
=
book
.
Base_getThemeDict
(
doc_format
=
book_format
,
css_path
=
"template_css/book"
,
skin
=
"Book"
)
# --------------------------- Source/Destination -------------------------------
book_source
=
book
.
Base_getSourceDict
(
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsLeaflet.py
View file @
c94060b9
...
...
@@ -75,7 +75,7 @@ if leaflet_reference is None:
leaflet_full_reference
=
'-'
.
join
([
leaflet_reference
,
leaflet_version
,
leaflet_language
])
# ---------------------------- Theme Parameters --------------------------------
leaflet_theme
=
leaflet
.
Base_getThemeDict
(
doc_format
=
leaflet_format
,
css_path
=
"template_css/leaflet"
)
leaflet_theme
=
leaflet
.
Base_getThemeDict
(
doc_format
=
leaflet_format
,
css_path
=
"template_css/leaflet"
,
skin
=
"Leaflet"
)
if
override_leaflet_header_title
and
override_leaflet_header_title
!=
blank
:
leaflet_theme
[
"theme_logo_description"
]
=
html_quote
(
override_leaflet_header_title
)
...
...
@@ -267,7 +267,6 @@ if leaflet_format == "pdf":
footer_spacing
=
3
)
)
return
leaflet
.
WebPage_finishPdfCreation
(
doc_download
=
leaflet_download
,
doc_save
=
leaflet_save
,
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsRelease.py
View file @
c94060b9
...
...
@@ -77,7 +77,7 @@ if release_reference is None:
release_full_reference
=
'-'
.
join
([
release_reference
,
release_version
,
release_language
])
# ---------------------------- Theme Parameters --------------------------------
release_theme
=
release
.
Base_getThemeDict
(
doc_format
=
release_format
,
css_path
=
"template_css/release"
)
release_theme
=
release
.
Base_getThemeDict
(
doc_format
=
release_format
,
css_path
=
"template_css/release"
,
skin
=
"Release"
)
release_css
=
''
.
join
([
'html .ci-press-release .ci-press-release-logo:before {'
,
'background: url("%s") center no-repeat;'
%
(
release_theme
.
get
(
"theme_logo_url"
)),
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsSlideshow.py
View file @
c94060b9
...
...
@@ -219,7 +219,7 @@ if doc_reference is None:
doc_full_reference
=
'-'
.
join
([
doc_reference
,
doc_version
,
doc_language
])
# --------------------------- Layout Parameters --------------------------------
doc_theme
=
doc
.
Base_getThemeDict
(
doc_format
=
doc_format
,
css_path
=
"template_css/slide"
)
doc_theme
=
doc
.
Base_getThemeDict
(
doc_format
=
doc_format
,
css_path
=
"template_css/slide"
,
skin
=
"Slide"
)
doc_css
=
''
.
join
([
'.ci-slideshow-intro.present:not(.slide-background):before {'
,
'content: "%s";'
%
(
doc_theme
.
get
(
"theme_logo_description"
)),
'background: #FFF url("%s") center no-repeat;'
%
(
doc
.
Base_setUrl
(
path
=
doc_theme
.
get
(
"theme_logo_url"
),
display
=
"medium"
)),
...
...
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