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
Ludovic Kiefer
erp5
Commits
a6921fd4
Commit
a6921fd4
authored
Dec 17, 2015
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! erp5_discussion: add predecessor handling to enable showing discussion related to document
parent
070c8f94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/WebSection_createNewDiscussionThread.xml
.../erp5_discussion/WebSection_createNewDiscussionThread.xml
+9
-7
No files found.
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/WebSection_createNewDiscussionThread.xml
View file @
a6921fd4
...
...
@@ -62,7 +62,7 @@ person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
\n
version = \'001\'\n
language = portal.Localizer.get_selected_language()\n
has_website = context.getWebSiteValue()\n
has_website = context.getWebSiteValue()
is not None
\n
\n
try:\n
user_assignment_dict = portal.ERP5Site_getPersonAssignmentDict()\n
...
...
@@ -76,13 +76,13 @@ if site_list in MARKER:\n
site_list = user_assignment_dict[\'site_list\']\n
\n
# set predicate settings for current Web Section\n
if has_website
is not None
:\n
if has_website:\n
membership_criterion_category_list = context.getMembershipCriterionCategoryList()\n
multimembership_criterion_base_category_list = context.getMultimembershipCriterionBaseCategoryList()\n
\n
reference = context.Base_generateReferenceFromString(title)\n
\n
if has_website
is not None
:\n
if has_website:\n
existing_document = context.getDocumentValue(reference)\n
existing_web_section_list = portal.portal_catalog(id=reference, portal_type=[\'Web Site\', \'Web Section\'])\n
existing_module_list = portal.portal_catalog(id=reference, parent_uid=portal.getUid())\n
...
...
@@ -106,7 +106,7 @@ create_kw = dict(title = title,\n
group_list=group_list,\n
site_list=site_list)\n
\n
if has_website
is not None
:\n
if has_website:\n
for base_category in multimembership_criterion_base_category_list:\n
#create_kw[\'%s_list\' %base_category] = [x for x in membership_criterion_category_list if x.startswith(base_category)]\n
category_list.extend([x for x in membership_criterion_category_list if x.startswith(base_category)])\n
...
...
@@ -120,10 +120,12 @@ discussion_thread = portal.discussion_thread_module.newContent(\n
discussion_thread.setCategoryList(category_list)\n
\n
# predecessor\n
if predecessor is not None:\n
if predecessor is None:\n
redirect_url = context.getAbsoluteUrl()\n
else:\n
predecessor_object = context.restrictedTraverse(predecessor)\n
predecessor_portal_type = predecessor_object.getPortalType()\n
predecessor_absolute
_url = predecessor_object.getAbsoluteUrl()\n
redirect
_url = predecessor_object.getAbsoluteUrl()\n
\n
# predecessor will only be set on document = web section default page\n
if predecessor_portal_type == \'Web Section\':\n
...
...
@@ -198,7 +200,7 @@ if send_notification_text not in (\'\', None):\n
message_text_format=notification_message.getContentType(),\n
store_as_event=False)\n
\n
return context.Base_redirect(redirect_url=
predecessor_absolute_url or context.getAbsoluteUrl()
,\n
return context.Base_redirect(redirect_url=
redirect_url
,\n
keep_items = dict(portal_status_message=context.Base_translateString(portal_status_message),\n
thread_relative_url=discussion_thread.getRelativeUrl()))\n
</string>
</value>
...
...
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