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
Joshua
erp5
Commits
e9b98429
Commit
e9b98429
authored
Jul 22, 2019
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity: display correct logo
parent
a9f0c444
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
14 deletions
+56
-14
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBookHeader.zpt
...kins/erp5_corporate_identity/WebPage_createBookHeader.zpt
+11
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
...ortal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
+17
-6
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.css.css
...l_skins/erp5_corporate_identity/template_css/book.css.css
+14
-1
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.pdf.css.css
...ins/erp5_corporate_identity/template_css/book.pdf.css.css
+14
-6
No files found.
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_createBookHeader.zpt
View file @
e9b98429
...
...
@@ -39,6 +39,16 @@ Creates the Book header.
var
y
=
document
.
getElementsByClassName
(
x
[
i
]);
for
(
var
j
=
0
;
j
<
y
.
length
;
++
j
)
y
[
j
].
textContent
=
vars
[
x
[
i
]];
}
var
z
=
document
.
getElementsByClassName
(
"
hack
"
);
for
(
var
k
=
0
;
k
<
z
.
length
;
++
k
)
{
var
pic
=
z
[
k
];
if
(
pic
.
naturalWidth
/
pic
.
naturalHeight
<=
1
)
{
pic
.
style
.
width
=
"
auto
"
;
pic
.
style
.
maxWidth
=
"
28mm
"
;
pic
.
style
.
maxHeight
=
"
28mm
"
pic
.
style
.
height
=
"
auto
"
;
}
}
}
</script>
</head>
...
...
@@ -55,7 +65,7 @@ Creates the Book header.
<tr>
<td>
<div
class=
"ci-book-header-image-wkhtmltopdf-image-wrapper"
>
<img
tal:attributes=
"src python: book_logo_url; alt python: book_logo_title"
/>
<img
class=
"hack"
tal:attributes=
"src python: book_logo_url; alt python: book_logo_title"
/>
</div>
</td>
<td>
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/WebPage_viewAsBook.py
View file @
e9b98429
...
...
@@ -89,6 +89,9 @@ 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"
)
...
...
@@ -126,6 +129,9 @@ 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
=
[]
...
...
@@ -182,6 +188,13 @@ 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_content.replace("${WebPage_insertTableOfReferences}", book_references.encode('UTF-8').strip())
book_content
=
book_content
.
replace
(
"${WebPage_insertTableOfReferences}"
,
book_references
.
encode
(
'UTF-8'
).
strip
())
else
:
book_content
=
book_content
.
replace
(
"${WebPage_insertTableOfReferences}"
,
blank
)
...
...
@@ -231,7 +244,7 @@ if book_format == "html" or book_format == "mhtml":
book_signature_list
=
book_signature_list
,
book_version_list
=
book_version_list
,
book_distribution_list
=
book_distribution_list
,
book_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
None
),
book_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
"small"
),
book_logo_title
=
book_theme
.
get
(
"theme_logo_description"
),
book_reference
=
book_reference
,
book_revision
=
book_revision
,
...
...
@@ -280,7 +293,7 @@ if book_format == "pdf":
book_language
=
book_language
,
book_theme_css_font_list
=
book_theme
.
get
(
"theme_css_font_list"
),
book_theme_css_url
=
book_theme
.
get
(
"theme_css_url"
),
book_theme_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
None
),
book_theme_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
"small"
),
book_theme_logo_alt
=
book_theme
.
get
(
"theme_logo_alt"
),
book_template_css_url
=
book_theme
.
get
(
"template_css_url"
),
book_include_history
=
book_include_history_table
,
...
...
@@ -290,7 +303,6 @@ if book_format == "pdf":
)
# book_references created and added above
book_content
=
book
.
WebPage_createBookContent
(
book_format
=
book_format
,
book_rendering_fix
=
book_rendering_fix
,
...
...
@@ -311,7 +323,7 @@ if book_format == "pdf":
book_theme_css_font_list
=
book_theme
.
get
(
"theme_css_font_list"
),
book_theme_css_url
=
book_theme
.
get
(
"theme_css_url"
),
book_template_css_url
=
book_theme
.
get
(
"template_css_url"
),
book_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
None
),
book_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
"small"
),
book_logo_title
=
book_theme
.
get
(
"theme_logo_description"
),
book_short_title
=
book_short_title
,
book_reference
=
book_reference
,
...
...
@@ -326,7 +338,7 @@ if book_format == "pdf":
book_language
=
book_language
,
book_theme_css_font_list
=
book_theme
.
get
(
"theme_css_font_list"
),
book_theme_css_url
=
book_theme
.
get
(
"theme_css_url"
),
book_theme_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
None
),
book_theme_logo_url
=
book
.
Base_setUrl
(
path
=
book_source
.
get
(
"enhanced_logo_url"
),
display
=
"small"
),
book_theme_logo_alt
=
book_theme
.
get
(
"theme_logo_description"
),
book_template_css_url
=
book_theme
.
get
(
"template_css_url"
),
book_full_reference
=
book_full_reference
,
...
...
@@ -365,7 +377,6 @@ if book_format == "pdf":
footer_spacing
=
3
,
)
)
return
book
.
WebPage_finishPdfCreation
(
doc_download
=
book_download
,
doc_save
=
book_save
,
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.css.css
View file @
e9b98429
...
...
@@ -245,11 +245,24 @@
display
:
inline
;
vertical-align
:
middle
;
}
/* BACKUP:
fits all logos, unless you have to use a really wiiiiide logo like Nexedi
*/
.ci-book
.ci-book-header
.ci-book-header-image-wkhtmltopdf-image-wrapper
img
{
height
:
auto
;
display
:
inline-block
;
width
:
auto
;
}
/* hardcode here we go.
NOTE: logos will disappear in wkhtmltopdf if they go beyond the available space
.ci-book .ci-book-header .ci-book-header-image-wkhtmltopdf-image-wrapper img {
height: auto;
display: inline-block;
width: 60%;
vertical-align: -webkit-baseline-middle;
}
*/
/* header spec section */
.ci-book
.ci-book-header
td
:last-child
{
text-align
:
left
;
...
...
bt5/erp5_corporate_identity/SkinTemplateItem/portal_skins/erp5_corporate_identity/template_css/book.pdf.css.css
View file @
e9b98429
...
...
@@ -258,17 +258,25 @@
width
:
100%
;
line-height
:
25mm
;
}
/* BACKUP:
fits all logos, unless you have to use a really wiiiiide logo like Nexedi
*/
.ci-book
.ci-book-header
.ci-book-header-image-wkhtmltopdf-image-wrapper
img
{
/*
display: inline-block;
width: auto;
height: auto;
*/
max-width
:
28mm
;
height
:
auto
;
vertical-align
:
middle
;
max-height
:
14mm
;
}
/* hardcode here we go.
NOTE: logos will disappear in wkhtmltopdf if they go beyond the available space
.ci-book .ci-book-header .ci-book-header-image-wkhtmltopdf-image-wrapper img {
height: auto;
vertical-align: middle;
display: inline-block;
width: 60%;
object-fit: contain;
}
*/
/* header spec section */
.ci-book
.ci-book-header
td
:last-child
{
text-align
:
left
;
...
...
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