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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
16408ff8
Commit
16408ff8
authored
May 19, 2017
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_appstore_base: Put all apps in one website
parent
ef54976b
Changes
17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
713 additions
and
232 deletions
+713
-232
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml
...eb_page_module/gadget_ojs_appstore_redirect_page_html.xml
+6
-4
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list.xml
...ase/PathTemplateItem/web_site_module/application-list.xml
+439
-0
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template.xml
...emplateItem/web_site_module/application-list/template.xml
+95
-57
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list/template/template.xml
...em/web_site_module/application-list/template/template.xml
+121
-85
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareProduct_fixRelatedWebSite.py
...ficejs_appstore_base/SoftwareProduct_fixRelatedWebSite.py
+2
-5
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareProduct_getRelatedWebSite.py
...ficejs_appstore_base/SoftwareProduct_getRelatedWebSite.py
+1
-1
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublicationModule_view.xml
...officejs_appstore_base/SoftwarePublicationModule_view.xml
+2
-3
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublication_getTestUrl.py
..._officejs_appstore_base/SoftwarePublication_getTestUrl.py
+6
-6
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublication_submitSoftwarePublication.py
...ore_base/SoftwarePublication_submitSoftwarePublication.py
+8
-5
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.py
...ejs_appstore_base/SoftwareRelease_fixRelatedWebSection.py
+19
-26
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.xml
...js_appstore_base/SoftwareRelease_fixRelatedWebSection.xml
+1
-1
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_publishRelatedWebDocument.py
...ppstore_base/SoftwareRelease_publishRelatedWebDocument.py
+1
-32
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSApplicationPage.py
...appstore_base/WebSection_renderOfficeJSApplicationPage.py
+1
-1
bt5/erp5_officejs_appstore_base/bt/template_keep_last_workflow_history_only_path_list
...ase/bt/template_keep_last_workflow_history_only_path_list
+3
-2
bt5/erp5_officejs_appstore_base/bt/template_keep_path_list
bt5/erp5_officejs_appstore_base/bt/template_keep_path_list
+2
-0
bt5/erp5_officejs_appstore_base/bt/template_keep_workflow_path_list
...fficejs_appstore_base/bt/template_keep_workflow_path_list
+3
-2
bt5/erp5_officejs_appstore_base/bt/template_path_list
bt5/erp5_officejs_appstore_base/bt/template_path_list
+3
-2
No files found.
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_page_module/gadget_ojs_appstore_redirect_page_html.xml
View file @
16408ff8
...
...
@@ -109,7 +109,9 @@
</item>
<item>
<key>
<string>
text_content_substitution_mapping_method_id
</string>
</key>
<value>
<string>
WebPage_getRenderJSSubstitutionMappingDict
</string>
</value>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
@@ -230,7 +232,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
supercedricle
n
</string>
</value>
<value>
<string>
cedric.le.ninivi
n
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -244,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
1.19443.53509.7185
</string>
</value>
<value>
<string>
95
8.21401.8615.61559
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
14
63665193.7
</float>
<float>
14
93976571.58
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/application-list.xml
0 → 100644
View file @
16408ff8
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/
officejs_app_template
/template.xml
→
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/
application-list
/template.xml
View file @
16408ff8
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/
officejs_app_
template.xml
→
bt5/erp5_officejs_appstore_base/PathTemplateItem/web_site_module/
application-list/template/
template.xml
View file @
16408ff8
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareProduct_fixRelatedWebSite.py
View file @
16408ff8
portal
=
context
.
getPortalObject
()
web_site
=
context
.
getFollowUpValue
(
portal_type
=
"Web S
ite
"
)
web_site
=
context
.
getFollowUpValue
(
portal_type
=
"Web S
ection
"
)
# Create Web Site if necessary
if
not
web_site
:
# XXX Hardcoded templ
web_site
=
portal
.
web_site_module
.
officejs_app_
template
.
Base_createCloneDocument
(
batch_mode
=
True
)
web_site
=
portal
.
web_site_module
[
'application-list'
].
template
.
Base_createCloneDocument
(
batch_mode
=
True
)
web_site
.
edit
(
title
=
context
.
getTitle
(),
short_title
=
context
.
getTitle
(),
...
...
@@ -17,8 +17,5 @@ if not web_site:
if
not
web_site
.
getId
()
==
context
.
getReference
().
lower
():
web_site
.
setId
(
context
.
getReference
().
lower
())
if
portal
.
portal_workflow
.
isTransitionPossible
(
web_site
,
'publish'
):
web_site
.
publish
()
if
batch_mode
:
return
web_site
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareProduct_getRelatedWebSite.py
View file @
16408ff8
return
context
.
getFollowUpValue
(
portal_type
=
"Web S
ite
"
)
return
context
.
getFollowUpValue
(
portal_type
=
"Web S
ection
"
)
raise
ValueError
(
"Unimplemented"
)
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublicationModule_view.xml
View file @
16408ff8
...
...
@@ -85,15 +85,14 @@
<list>
<string>
listbox_delivery_start_date
</string>
<string>
listbox_delivery_stop_date
</string>
<string>
listbox_modification_date
</string>
</list>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
listbox_modification_date
</string>
</list>
<list/>
</value>
</item>
<item>
...
...
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublication_getTestUrl.py
View file @
16408ff8
...
...
@@ -5,11 +5,11 @@ software_publication_line = software_publication_line_list[0]
software_release
=
software_publication_line
.
getAggregateValue
(
portal_type
=
"Software Release"
)
software_product
=
software_publication_line
.
getResourceValue
(
portal_type
=
"Software Product"
)
if
not
software_product
or
not
software_release
:
if
not
software_product
or
not
software_release
or
not
software_product
.
getFollowUpId
(
portal_type
=
"Web Section"
)
:
return
software_release_version
=
software_release
.
getReference
()
#if as_link:
# return '<a href="%(link)s">%(link)s</a>' % {"link": (software_product.getFollowUpValue(portal_type="Web Site")[software_release_version].absolute_url() + "/")}
return
software_product
.
getFollowUpValue
(
portal_type
=
"Web Site"
)[
software_release_version
].
absolute_url
()
+
"/"
# XXX Hardcoded
return
"https://%s.app.officejs.com/%s/"
%
(
software_product
.
getFollowUpId
(
portal_type
=
"Web Section"
),
software_release
.
getReference
(),
)
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwarePublication_submitSoftwarePublication.py
View file @
16408ff8
...
...
@@ -58,6 +58,7 @@ base_length = len(base)
software_release_url
=
software_release
.
getRelativeUrl
()
tag
=
"preparing_sr_%s"
%
software_release_url
default_page
=
""
for
name
in
zip_reader
.
namelist
():
if
zip_reader
.
getinfo
(
name
).
file_size
==
0
:
continue
...
...
@@ -84,12 +85,14 @@ for name in zip_reader.namelist():
# XX Hackish
document
.
setCategoryList
(
document
.
getCategoryList
()
+
[
"contributor/"
+
software_publication
.
getSource
()])
document
.
activate
(
tag
=
tag
).
submit
()
if
url
in
(
"index.html"
,
"index.htm"
):
default_page
=
document
.
getRelativeUrl
()
document
.
activate
(
tag
=
tag
).
publish
()
software_release
.
activate
(
after_tag
=
tag
,
tag
=
tag
+
"_2"
).
SoftwareRelease_fixRelatedWebSection
(
)
software_release
.
SoftwareRelease_fixRelatedWebSection
(
default_page
=
default_page
)
if
portal
.
portal_workflow
.
isTransitionPossible
(
zip_file
,
'
submit
'
):
zip_file
.
submit
()
if
portal
.
portal_workflow
.
isTransitionPossible
(
zip_file
,
'
publish
'
):
zip_file
.
publish
()
if
portal
.
portal_workflow
.
isTransitionPossible
(
software_release
,
'submit'
):
software_release
.
submit
()
software_publication
.
activate
(
after_tag
=
tag
+
"_2"
).
submit
()
software_publication
.
activate
(
after_tag
=
tag
).
submit
()
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.py
View file @
16408ff8
...
...
@@ -6,15 +6,12 @@ software_product = software_release.getFollowUpValue(portal_type="Software Produ
web_site
=
software_product
.
SoftwareProduct_fixRelatedWebSite
(
batch_mode
=
True
)
version
=
software_release
.
getReference
()
context
.
log
(
version
)
context
.
log
(
"%s"
%
web_site
.
getRelativeUrl
())
try
:
web_section
=
web_site
.
restrictedTraverse
(
version
)
except
KeyError
:
source
=
portal
.
web_site_module
.
officejs_app_template
clipboard
=
source
.
manage_copyObjects
(
ids
=
[
"template"
])
context
.
REQUEST
.
set
(
'__cp'
,
clipboard
)
# CopySupport is using this to set
# tracebility information in edit_workflow history
paste_result
=
web_site
.
manage_pasteObjects
(
cb_copy_data
=
clipboard
)
web_section
=
web_site
[
paste_result
[
0
][
'new_id'
]]
web_section
=
web_site
.
template
.
Base_createCloneDocument
(
batch_mode
=
True
)
web_section
.
edit
(
id
=
version
,
title
=
software_release
.
getVersion
(),
...
...
@@ -24,30 +21,26 @@ except KeyError:
# Update development section to use version and follow_up
web_section
.
setCriterionPropertyList
([
"version"
,
"validation_state"
,
])
web_section
.
setCriterion
(
'version'
,
version
[:
10
])
web_section
.
setCriterion
(
'validation_state'
,
'submitted'
)
web_section
.
setMembershipCriterionBaseCategoryList
([
'follow_up'
])
web_section
.
setMembershipCriterionCategoryList
([
'follow_up/'
+
context
.
getRelativeUrl
()])
if
portal
.
portal_workflow
.
isTransitionPossible
(
web_section
,
'publish'
):
web_section
.
publish
()
# Update default page for development version.
landing_publication_uid
=
portal
.
portal_categories
.
publication_section
.
application
.
landing_page
.
getUid
()
aggregate_list
=
portal
.
portal_catalog
(
if
not
default_page
:
# Update default page for development version.
landing_publication_uid
=
portal
.
portal_categories
.
publication_section
.
application
.
landing_page
.
getUid
()
aggregate_list
=
portal
.
portal_catalog
(
portal_type
=
"File"
,
strict_follow_up_uid
=
context
.
getUid
(),
strict_publication_section_uid
=
landing_publication_uid
,
validation_state
=
"submitted"
,
#XXX Hackish
sort_on
=
[(
"modification_date"
,
"descending"
)],
limit
=
1
,
select_list
=
[
"relative_url"
],
)
if
aggregate_list
:
)
if
aggregate_list
:
web_section
.
setAggregate
(
aggregate_list
[
0
].
relative_url
)
else
:
web_section
.
setAggregate
(
default_page
)
return
"Done"
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_fixRelatedWebSection.xml
View file @
16408ff8
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
default_page=""
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/SoftwareRelease_publishRelatedWebDocument.py
View file @
16408ff8
portal
=
context
.
getPortalObject
()
software_release
=
context
# Publish Web Document
web_document_list
=
portal
.
portal_catalog
(
portal_type
=
portal
.
getPortalDocumentTypeList
(),
strict_follow_up_uid
=
software_release
.
getUid
(),
validation_state
=
"submitted"
,
)
today
=
DateTime
().
earliestTime
()
for
web_document
in
web_document_list
:
web_document
.
setEffectiveDate
(
today
)
web_document
.
publish
()
software_product
=
context
.
getFollowUpValue
(
portal_type
=
"Software Product"
)
web_site
=
software_product
.
SoftwareProduct_getRelatedWebSite
()
# Publish Web Site, Websection and update version
today
=
DateTime
().
earliestTime
()
if
web_site
.
getValidationState
()
!=
'published'
:
web_site
.
setEffectiveDate
(
today
)
web_site
.
publish
()
version_web_section
=
web_site
[
software_release
.
getReference
()]
version_web_section
.
setCriterion
(
'validation_state'
,
'published'
)
if
portal
.
portal_workflow
.
isTransitionPossible
(
version_web_section
,
'publish'
):
version_web_section
.
publish
()
def
webSectionUpdatePredicate
(
current_section
):
current_section
.
setCriterion
(
'validation_state'
,
'published'
)
for
child_section
in
current_section
.
objectValues
(
portal_type
=
"Web Section"
):
webSectionUpdatePredicate
(
child_section
)
webSectionUpdatePredicate
(
version_web_section
)
web_site
.
edit
(
configuration_latest_version
=
software_release
.
get
Version
(),
configuration_latest_version
=
software_release
.
get
Reference
(),
)
# Update appcache
...
...
bt5/erp5_officejs_appstore_base/SkinTemplateItem/portal_skins/erp5_officejs_appstore_base/WebSection_renderOfficeJSApplicationPage.py
View file @
16408ff8
...
...
@@ -8,6 +8,6 @@ web_section = REQUEST.get("current_web_section")
#raise ValueError(web_section.getLayoutProperty("configuration_latest_version", default="development"))
return
default_web_page
.
WebPage_viewAsWeb
(
mapping_dict
=
{
#
"latest_version": web_section.getLayoutProperty("configuration_latest_version", default="development"),
"latest_version"
:
web_section
.
getLayoutProperty
(
"configuration_latest_version"
,
default
=
"development"
),
#"application_appcache": web_section.getId() + ".appcache",
})
bt5/erp5_officejs_appstore_base/bt/template_keep_last_workflow_history_only_path_list
View file @
16408ff8
web_page_module/gadget_ojs_*
web_site_module/officejs_appstore
web_site_module/officejs_appstore/**
web_site_module/officejs_app_template
web_site_module/officejs_app_template/**
\ No newline at end of file
web_site_module/application-list
web_site_module/application-list/template
web_site_module/application-list/template/**
\ No newline at end of file
bt5/erp5_officejs_appstore_base/bt/template_keep_path_list
0 → 100644
View file @
16408ff8
web_site_module/officejs_app_template
web_site_module/officejs_app_template/**
\ No newline at end of file
bt5/erp5_officejs_appstore_base/bt/template_keep_workflow_path_list
View file @
16408ff8
web_page_module/gadget_ojs_*
web_site_module/officejs_appstore
web_site_module/officejs_appstore/**
web_site_module/officejs_app_template
web_site_module/officejs_app_template/**
\ No newline at end of file
web_site_module/application-list
web_site_module/application-list/template
web_site_module/application-list/template/**
\ No newline at end of file
bt5/erp5_officejs_appstore_base/bt/template_path_list
View file @
16408ff8
...
...
@@ -3,7 +3,8 @@ portal_categories/product_line/software
portal_categories/product_line/software/**
portal_categories/publication_section/**
web_page_module/gadget_ojs_*
web_site_module/officejs_app_template
web_site_module/officejs_app_template/**
web_site_module/application-list
web_site_module/application-list/template
web_site_module/application-list/template/**
web_site_module/officejs_appstore
web_site_module/officejs_appstore/**
\ 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