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
Léo-Paul Géneau
erp5
Commits
eed0e738
Commit
eed0e738
authored
Dec 14, 2021
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
[ERP5 Master appstore_base] refactor documents app creation
See merge request
nexedi/erp5!1522
parents
ce7d2e8e
9a1e5fa6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublication_submitSoftwarePublication.py
...ore_base/SoftwarePublication_submitSoftwarePublication.py
+12
-7
No files found.
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublication_submitSoftwarePublication.py
View file @
eed0e738
...
@@ -76,6 +76,14 @@ base_length = len(getBaseDirectory(zip_reader.namelist()))
...
@@ -76,6 +76,14 @@ base_length = len(getBaseDirectory(zip_reader.namelist()))
tag
=
"preparing_sr_%s"
%
software_release_url
tag
=
"preparing_sr_%s"
%
software_release_url
default_page
=
""
default_page
=
""
web_manifest_url
=
None
web_manifest_url
=
None
doc_tag
=
"creating_doc_for_%s"
%
software_release_url
try
:
publication_source_category
=
"contributor/"
+
software_publication
.
getSource
()
except
TypeError
:
rejectSoftwarePublication
(
software_publication
)
return
for
name
in
zip_reader
.
namelist
():
for
name
in
zip_reader
.
namelist
():
if
zip_reader
.
getinfo
(
name
).
file_size
==
0
:
if
zip_reader
.
getinfo
(
name
).
file_size
==
0
:
continue
continue
...
@@ -87,7 +95,7 @@ for name in zip_reader.namelist():
...
@@ -87,7 +95,7 @@ for name in zip_reader.namelist():
else
:
else
:
publication_section
=
application_publication_section
.
getRelativeUrl
()
publication_section
=
application_publication_section
.
getRelativeUrl
()
document
=
portal
.
portal_contributions
.
newContent
(
document
=
portal
.
document_module
.
newContent
(
file
=
temp_file
,
file
=
temp_file
,
filename
=
url
,
filename
=
url
,
redirect_to_document
=
False
,
redirect_to_document
=
False
,
...
@@ -98,19 +106,16 @@ for name in zip_reader.namelist():
...
@@ -98,19 +106,16 @@ for name in zip_reader.namelist():
publication_section_value
=
publication_section
,
publication_section_value
=
publication_section
,
follow_up
=
software_release_url
,
follow_up
=
software_release_url
,
portal_type
=
"File"
,
portal_type
=
"File"
,
activate_kw
=
dict
(
tag
=
doc_tag
)
)
)
try
:
publication_source_category
=
"contributor/"
+
software_publication
.
getSource
()
except
TypeError
:
rejectSoftwarePublication
(
software_publication
)
return
# XX Hackish
# XX Hackish
document
.
setCategoryList
(
document
.
setCategoryList
(
document
.
getCategoryList
()
+
[
publication_source_category
])
document
.
getCategoryList
()
+
[
publication_source_category
])
if
url
in
(
"index.html"
,
"index.htm"
):
if
url
in
(
"index.html"
,
"index.htm"
):
default_page
=
document
.
getRelativeUrl
()
default_page
=
document
.
getRelativeUrl
()
web_manifest_url
=
extractWebManifest
(
document
.
getData
())
web_manifest_url
=
extractWebManifest
(
document
.
getData
())
document
.
activate
(
tag
=
tag
).
publish
()
document
.
activate
(
tag
=
tag
,
after_tag
=
doc_tag
).
publish
()
software_release
.
SoftwareRelease_fixRelatedWebSection
(
default_page
=
default_page
,
web_manifest
=
web_manifest_url
)
software_release
.
SoftwareRelease_fixRelatedWebSection
(
default_page
=
default_page
,
web_manifest
=
web_manifest_url
)
...
...
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