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
iv
erp5
Commits
418735d7
Commit
418735d7
authored
Feb 04, 2013
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend code to remove the language from real context url is exist
parent
6a67e8ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getActiveKnowledgePadForUser.xml
...5_knowledge_pad/ERP5Site_getActiveKnowledgePadForUser.xml
+6
-1
bt5/erp5_knowledge_pad/bt/revision
bt5/erp5_knowledge_pad/bt/revision
+1
-1
No files found.
bt5/erp5_knowledge_pad/SkinTemplateItem/portal_skins/erp5_knowledge_pad/ERP5Site_getActiveKnowledgePadForUser.xml
View file @
418735d7
...
@@ -75,6 +75,11 @@ while real_context.isTempObject():\n
...
@@ -75,6 +75,11 @@ while real_context.isTempObject():\n
real_context = real_context.getParentValue()\n
real_context = real_context.getParentValue()\n
real_context_url = real_context.getRelativeUrl()\n
real_context_url = real_context.getRelativeUrl()\n
\n
\n
real_context_url_list = real_context_url.split("/")\n
current_language = context.Localizer.get_selected_language()\n
if current_language in real_context_url_list:\n
real_context_url = "/".join(filter(lambda x: x != current_language, real_context_url_list))\n
\n
# first filter if we have a custom Pad for the context\n
# first filter if we have a custom Pad for the context\n
for knowledge_pad in knowledge_pads:\n
for knowledge_pad in knowledge_pads:\n
pad_state = knowledge_pad.getValidationState()\n
pad_state = knowledge_pad.getValidationState()\n
...
@@ -88,7 +93,7 @@ for knowledge_pad in knowledge_pads:\n
...
@@ -88,7 +93,7 @@ for knowledge_pad in knowledge_pads:\n
return knowledge_pad, knowledge_pads\n
return knowledge_pad, knowledge_pads\n
elif len(publication_section_list) == 0 and default_pad_group in MARKER and pad_state in visible_state_list:\n
elif len(publication_section_list) == 0 and default_pad_group in MARKER and pad_state in visible_state_list:\n
# ERP5 Site front gadget \n
# ERP5 Site front gadget \n
return knowledge_pad, knowledge_pads
\n
return knowledge_pad, knowledge_pads\n
\n
\n
# no customized version found for this context so\n
# no customized version found for this context so\n
# try finding pad by group\n
# try finding pad by group\n
...
...
bt5/erp5_knowledge_pad/bt/revision
View file @
418735d7
756
757
\ No newline at end of file
\ No newline at end of file
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