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
Nikola Balog
erp5
Commits
995934c2
Commit
995934c2
authored
Jul 24, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Remove useless files from erp5_xhtml_style folder
parent
0b4cdd11
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
350 deletions
+0
-350
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
...em/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
+0
-64
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.zpt
...Item/portal_skins/erp5_xhtml_style/context_box_render.zpt
+0
-286
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.py
deleted
100644 → 0
View file @
0b4cdd11
"""This script fix dialog actions to add an empty dialog for object_print
actions that does not provide one.
"""
from
Products.PythonScripts.standard
import
url_quote
if
dialog_category
==
'object_report'
:
return
sorted
(
actions
.
get
(
'object_report'
,
[])
+
actions
.
get
(
'object_report_jio'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
elif
dialog_category
==
'object_exchange'
:
return
sorted
(
actions
.
get
(
'object_exchange'
,
[])
+
actions
.
get
(
'object_exchange_jio'
,
[]),
key
=
lambda
x
:
x
[
"priority"
])
if
dialog_category
!=
'object_print'
:
return
actions
.
get
(
dialog_category
,
[])
def
addDialogIfNeeded
(
url
):
'''If the action url is not a dialog, we add a generic print dialog.
'''
parts
=
url
.
split
(
'/'
)
absolute_url
=
'/'
.
join
(
parts
[:
-
1
])
action
=
parts
[
-
1
]
action_list
=
action
.
split
(
'?'
)
action_id
=
action_list
[
0
]
form
=
getattr
(
context
,
action_id
,
None
)
# try to get format parameter if exists
parameter_kw
=
{}
format
=
''
if
len
(
action_list
)
>
1
:
parameter_list
=
action
.
split
(
'?'
)[
1
]
parameter_tuple_list
=
[
tuple
(
tuple_parameter
.
split
(
'='
))
for
tuple_parameter
in
parameter_list
.
split
(
'&'
)]
parameter_kw
=
dict
(
parameter_tuple_list
)
meta_type
=
getattr
(
form
,
'meta_type'
,
None
)
if
meta_type
in
(
'ERP5 Form Printout'
,
'ERP5 OOo Template'
,):
# The target is a Form Printout or OOoTemplate so use dedicated form_dialog to enable
# conversion and/or deferred reporting
if
meta_type
==
'ERP5 Form Printout'
:
base_content_type
=
getattr
(
form
,
form
.
template
).
getProperty
(
'content_type'
)
else
:
base_content_type
=
form
.
getProperty
(
'content_type'
)
if
parameter_kw
.
has_key
(
'format'
):
# if format is passed in action url: remove it
format
=
parameter_kw
.
pop
(
'format'
)
action
=
'%s?%s'
%
(
action_id
,
'&'
.
join
([
'='
.
join
(
tuple_parameter
)
for
tuple_parameter
in
parameter_kw
.
items
()]))
url
=
'%s/Base_viewOOoPrintDialog?dialog_action_url=%s&base_content_type=%s&field_your_format=%s'
%
(
context
.
absolute_url
(),
url_quote
(
'%s/%s'
%
(
absolute_url
,
action
)),
url_quote
(
base_content_type
),
url_quote
(
format
))
elif
not
(
hasattr
(
form
,
'pt'
)
and
form
.
pt
==
'form_dialog'
):
url
=
'%s/Base_viewIntermediatePrintDialog?dialog_action_url=%s'
%
(
context
.
absolute_url
(),
url_quote
(
'%s/%s'
%
(
absolute_url
,
action
)))
return
url
print_action_list
=
actions
[
'object_print'
]
new_print_action_list
=
[]
for
ai
in
print_action_list
:
ai_copy
=
ai
.
copy
()
# this is quite low level. It may require to be done from file system code in
# the future.
ai_copy
.
update
(
dict
(
original_url
=
ai_copy
[
'url'
],
url
=
addDialogIfNeeded
(
ai_copy
[
'url'
])))
new_print_action_list
.
append
(
ai_copy
)
return
new_print_action_list
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/context_box_render.zpt
deleted
100644 → 0
View file @
0b4cdd11
This diff is collapsed.
Click to expand it.
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