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
Georgios Dagkakis
erp5
Commits
ba315d66
Commit
ba315d66
authored
Jul 25, 2017
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: update WebSection_renderDefaultPageAsGadget
so that it does not add two slashes in the computed url
parent
71bf9fc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
...5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
+5
-2
No files found.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/WebSection_renderDefaultPageAsGadget.py
View file @
ba315d66
...
...
@@ -16,15 +16,18 @@ website_url_set = {}
#simplify code of Base_doLanguage, can't ues Base_doLanguage directly
root_website_url
=
web_section
.
getOriginalDocument
().
absolute_url
()
root_website_url
=
root_website_url
[:
-
1
]
if
root_website_url
.
endswith
(
'/'
)
else
root_website_url
website_url_pattern
=
r'^%s(?:%s)*(/|$)'
%
(
re
.
escape
(
root_website_url
),
'|'
.
join
(
'/'
+
re
.
escape
(
x
)
for
x
in
available_language_set
))
for
language
in
available_language_set
:
web_section_url
=
web_section
.
absolute_url
()
web_section_url
=
web_section_url
[:
-
1
]
if
web_section_url
.
endswith
(
'/'
)
else
web_section_url
if
language
==
default_language
:
website_url_set
[
language
]
=
re
.
sub
(
website_url_pattern
,
r'%s/\1'
%
root_website_url
,
web_section
.
absolute_url
()
)
website_url_set
[
language
]
=
re
.
sub
(
website_url_pattern
,
r'%s/\1'
%
root_website_url
,
web_section
_url
)
else
:
website_url_set
[
language
]
=
re
.
sub
(
website_url_pattern
,
r'%s/%s/\1'
%
(
root_website_url
,
language
),
web_section
.
absolute_url
()
)
website_url_set
[
language
]
=
re
.
sub
(
website_url_pattern
,
r'%s/%s/\1'
%
(
root_website_url
,
language
),
web_section
_url
)
view_as_web_method
=
default_web_page
.
getTypeBasedMethod
(
"viewAsWeb"
,
...
...
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