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
b2d6c146
Commit
b2d6c146
authored
Dec 08, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_forge: commit from xhtml_style and from erp5js
parent
2061bb75
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
651 additions
and
27 deletions
+651
-27
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.py
...tem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.py
+50
-14
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.xml
...em/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.xml
+1
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsLogin.py
...Item/portal_skins/erp5_vcs/BusinessTemplate_doVcsLogin.py
+4
-3
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsLogin.xml
...tem/portal_skins/erp5_vcs/BusinessTemplate_doVcsLogin.xml
+1
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_handleException.py
...portal_skins/erp5_vcs/BusinessTemplate_handleException.py
+10
-2
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_handleException.xml
...ortal_skins/erp5_vcs/BusinessTemplate_handleException.xml
+1
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewGitLogin.xml
...m/portal_skins/erp5_vcs/BusinessTemplate_viewGitLogin.xml
+3
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewGitLogin/remote_url.xml
...ins/erp5_vcs/BusinessTemplate_viewGitLogin/remote_url.xml
+1
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewGitLogin/your_commit_json.xml
...p5_vcs/BusinessTemplate_viewGitLogin/your_commit_json.xml
+280
-0
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog.xml
...rtal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog.xml
+9
-0
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_added.xml
...erp5_vcs/BusinessTemplate_viewVcsChangelog/your_added.xml
+1
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_commit_json.xml
...cs/BusinessTemplate_viewVcsChangelog/your_commit_json.xml
+280
-0
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_modified.xml
...5_vcs/BusinessTemplate_viewVcsChangelog/your_modified.xml
+9
-1
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_removed.xml
...p5_vcs/BusinessTemplate_viewVcsChangelog/your_removed.xml
+1
-1
No files found.
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.py
View file @
b2d6c146
kw
=
{}
request
=
container
.
REQUEST
for
k
in
'added'
,
'modified'
,
'removed'
:
file_list
=
request
.
get
(
k
,
())
# XXX: ERP5VCS_doCreateJavaScriptStatus should send lists
if
isinstance
(
file_list
,
basestring
):
file_list
=
file_list
!=
'none'
and
filter
(
None
,
file_list
.
split
(
','
))
or
()
kw
[
k
]
=
file_list
changelog
=
request
.
get
(
'changelog'
,
''
)
if
not
changelog
.
strip
():
import
json
context
.
log
(
'BusinessTemplate_viewVcsStatusDialog
\
n
chnagelog %s
\
n
push %s
\
n
added %s
\
n
modified %s
\
n
removed %s
\
n
json %s
\
n
kw %s'
%
(
changelog
,
push
,
added
,
modified
,
removed
,
commit_json
,
str
(
kw
)))
commit_dict
=
json
.
loads
(
commit_json
)
if
commit_json
is
not
None
else
{
'added'
:
(),
'modified'
:
(),
'removed'
:
(),
'changelog'
:
''
,
'push'
:
False
}
for
key
,
file_list
in
((
'added'
,
added
),
(
'modified'
,
modified
),
(
'removed'
,
removed
)):
if
file_list
is
not
None
:
# XXX: ERP5VCS_doCreateJavaScriptStatus should send lists
if
isinstance
(
file_list
,
basestring
):
file_list
=
file_list
!=
'none'
and
filter
(
None
,
file_list
.
split
(
','
))
or
()
commit_dict
[
key
]
=
file_list
if
changelog
is
not
None
:
commit_dict
[
'changelog'
]
=
changelog
if
push
is
not
None
:
commit_dict
[
'push'
]
=
push
# Remover keys used when handling commit exception
commit_dict
.
pop
(
'caller'
,
None
)
commit_dict
.
pop
(
'caller_kw'
,
None
)
# Always propage all informations throught formulator hidden field
request
=
context
.
REQUEST
request
.
form
[
'your_commit_json'
]
=
json
.
dumps
(
commit_dict
)
request
.
form
[
'your_added'
]
=
commit_dict
[
'added'
]
request
.
form
[
'your_modified'
]
=
commit_dict
[
'modified'
]
request
.
form
[
'your_removed'
]
=
commit_dict
[
'removed'
]
if
commit_dict
[
'changelog'
].
strip
():
request
.
form
[
'your_changelog'
]
=
commit_dict
[
'changelog'
]
else
:
from
Products.ERP5Type.Message
import
translateString
error_msg
=
"Please set a ChangeLog message."
return
context
.
asContext
(
**
kw
).
Base_renderForm
(
'BusinessTemplate_viewVcsChangelog'
,
keep_items
=
{
# return context.asContext(**kw).Base_renderForm('BusinessTemplate_viewVcsChangelog', keep_items={
return
context
.
Base_renderForm
(
'BusinessTemplate_viewVcsChangelog'
,
keep_items
=
{
'portal_status_message'
:
translateString
(
error_msg
),
'cancel_url'
:
context
.
absolute_url
()
+
'/BusinessTemplate_viewVcsStatus?do_extract:int=0'
...
...
@@ -19,6 +49,12 @@ if not changelog.strip():
})
try
:
return
context
.
getVcsTool
().
commit
(
changelog
,
**
kw
)
return
context
.
getVcsTool
().
commit
(
commit_dict
[
'changelog'
],
commit_dict
[
'push'
],
added
=
commit_dict
[
'added'
],
modified
=
commit_dict
[
'modified'
],
removed
=
commit_dict
[
'removed'
]
)
except
Exception
,
error
:
return
context
.
BusinessTemplate_handleException
(
error
,
script
.
id
)
return
context
.
BusinessTemplate_handleException
(
error
,
script
.
id
,
commit_dict
=
commit_dict
)
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsCommit.xml
View file @
b2d6c146
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
<value>
<string>
push=None, changelog=None, added=None, modified=None, removed=None, commit_json=None,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsLogin.py
View file @
b2d6c146
if
caller_kw
is
None
:
caller_kw
=
{}
context
.
getVcsTool
().
setLogin
(
auth
,
user
,
password
)
return
context
.
restrictedTraverse
(
caller
)(
**
caller_kw
)
import
json
commit_dict
=
json
.
loads
(
commit_json
)
context
.
log
(
'BusinessTemplate_doVcsLogin
\
n
dict %s'
%
str
(
commit_dict
))
return
context
.
restrictedTraverse
(
commit_dict
[
'caller'
].
encode
())(
commit_json
=
commit_json
)
# XXX**commit_dict['caller_kw'])
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_doVcsLogin.xml
View file @
b2d6c146
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
user, password, auth, c
aller, caller_kw=None, added=(), modified=(), removed=(), changelog=None
, **kw
</string>
</value>
<value>
<string>
user, password, auth, c
ommit_json
, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_handleException.py
View file @
b2d6c146
from
erp5.component.module.Git
import
GitLoginError
from
erp5.component.module.SubversionClient
import
SubversionSSLTrustError
,
SubversionLoginError
import
json
try
:
raise
exception
...
...
@@ -16,5 +17,12 @@ except GitLoginError, e:
kw
=
dict
(
remote_url
=
context
.
getVcsTool
().
getRemoteUrl
())
method
=
'BusinessTemplate_viewGitLogin'
context
.
REQUEST
.
set
(
'portal_status_message'
,
message
)
return
context
.
asContext
(
**
kw
).
Base_renderForm
(
method
,
caller
=
caller
,
caller_kw
=
caller_kw
)
commit_dict
[
'caller'
]
=
caller
# XXX caller_kw
# Always propage all informations throught formulator hidden field
request
=
context
.
REQUEST
request
.
form
[
'your_commit_json'
]
=
json
.
dumps
(
commit_dict
)
return
context
.
Base_renderForm
(
method
,
keep_items
=
{
'portal_status_message'
:
message
})
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_handleException.xml
View file @
b2d6c146
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
exception, caller, **caller_kw
</string>
</value>
<value>
<string>
exception, caller,
commit_dict,
**caller_kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewGitLogin.xml
View file @
b2d6c146
...
...
@@ -78,7 +78,9 @@
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
<list>
<string>
your_commit_json
</string>
</list>
</value>
</item>
<item>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewGitLogin/remote_url.xml
View file @
b2d6c146
...
...
@@ -125,7 +125,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
here/remote_url
</string>
</value>
<value>
<string>
python: context.getVcsTool().getRemoteUrl()
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewGitLogin/your_commit_json.xml
0 → 100644
View file @
b2d6c146
This diff is collapsed.
Click to expand it.
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog.xml
View file @
b2d6c146
...
...
@@ -64,6 +64,7 @@
<value>
<list>
<string>
center
</string>
<string>
bottom
</string>
</list>
</value>
</item>
...
...
@@ -71,6 +72,14 @@
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list>
<string>
your_commit_json
</string>
</list>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_added.xml
View file @
b2d6c146
...
...
@@ -82,7 +82,7 @@
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_commit_json.xml
0 → 100644
View file @
b2d6c146
This diff is collapsed.
Click to expand it.
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_modified.xml
View file @
b2d6c146
...
...
@@ -53,6 +53,10 @@
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -65,6 +69,10 @@
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -74,7 +82,7 @@
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
...
...
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_vcs/BusinessTemplate_viewVcsChangelog/your_removed.xml
View file @
b2d6c146
...
...
@@ -82,7 +82,7 @@
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
...
...
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