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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
92dcef61
Commit
92dcef61
authored
Jan 06, 2021
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
romain_dev: up
parent
4902e93c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
34 deletions
+43
-34
bt5/romain_dev/SkinTemplateItem/portal_skins/romain_dev/testromain.py
...ev/SkinTemplateItem/portal_skins/romain_dev/testromain.py
+43
-34
No files found.
bt5/romain_dev/SkinTemplateItem/portal_skins/romain_dev/testromain.py
View file @
92dcef61
...
...
@@ -4,9 +4,11 @@ post_per_thread_amount = 97
max_new_document
=
100
tag
=
'POPULATE_FORUM'
after_tag
=
tag
+
'XXX'
if
(
current_project_uid
is
None
)
and
(
created_project_count
<
project_count
):
if
(
current_project_uid
is
None
):
if
(
created_project_count
<
project_count
):
created_project_count
+=
1
created_thread_count
=
0
created_post_count
=
0
...
...
@@ -16,26 +18,33 @@ if (current_project_uid is None) and (created_project_count < project_count):
title
=
'Forum project %i'
%
created_project_count
,
activate_kw
=
{
'tag'
:
tag
}
)
return
context
.
activate
(
after_tag
=
tag
).
testromain
(
return
context
.
activate
(
after_tag
=
after_
tag
).
testromain
(
current_project_uid
=
project
.
getUid
(),
created_project_count
=
created_project_count
)
else
:
return
'stopping'
if
(
current_thread_path
is
None
)
and
(
created_thread_count
<
thread_per_project_count
):
if
(
current_thread_path
is
None
):
if
(
created_thread_count
<
thread_per_project_count
):
created_thread_count
+=
1
thread
=
context
.
discussion_thread_module
.
newContent
(
portal_type
=
'Discussion Thread'
,
title
=
'
Forum project %i discussion %i'
%
(
created_project_count
,
created_thread_count
),
title
=
'New
Forum project %i discussion %i'
%
(
created_project_count
,
created_thread_count
),
follow_up_uid
=
current_project_uid
,
activate_kw
=
{
'tag'
:
tag
}
)
thread
.
share
()
return
context
.
activate
(
after_tag
=
tag
).
testromain
(
return
context
.
activate
(
after_tag
=
after_
tag
).
testromain
(
current_project_uid
=
current_project_uid
,
current_thread_path
=
thread
.
getRelativeUrl
(),
created_project_count
=
created_project_count
,
created_thread_count
=
created_thread_count
)
else
:
return
context
.
activate
(
after_tag
=
after_tag
).
testromain
(
created_project_count
=
created_project_count
)
if
(
current_thread_path
is
not
None
):
if
(
created_post_count
<
post_per_thread_amount
):
...
...
@@ -48,7 +57,7 @@ if (current_thread_path is not None):
activate_kw
=
{
'tag'
:
tag
}
)
# post.share()
return
context
.
activate
(
after_tag
=
tag
).
testromain
(
return
context
.
activate
(
after_tag
=
after_
tag
).
testromain
(
current_project_uid
=
current_project_uid
,
current_thread_path
=
current_thread_path
,
created_project_count
=
created_project_count
,
...
...
@@ -56,7 +65,7 @@ if (current_thread_path is not None):
created_post_count
=
created_post_count
)
else
:
return
context
.
activate
(
after_tag
=
tag
).
testromain
(
return
context
.
activate
(
after_tag
=
after_
tag
).
testromain
(
current_project_uid
=
current_project_uid
,
created_project_count
=
created_project_count
,
created_thread_count
=
created_thread_count
...
...
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