Let batch views allow or deny "execute results" option
This commit is contained in:
parent
277d98ae2c
commit
a7d8cfcdbb
5 changed files with 76 additions and 73 deletions
|
@ -68,6 +68,7 @@ class BatchMasterView(MasterView):
|
|||
edit_with_rows = False
|
||||
cloneable = False
|
||||
executable = True
|
||||
results_executable = False
|
||||
supports_mobile = True
|
||||
mobile_filterable = True
|
||||
mobile_rows_viewable = True
|
||||
|
@ -986,11 +987,12 @@ class BatchMasterView(MasterView):
|
|||
permission='{}.edit'.format(permission_prefix))
|
||||
|
||||
# execute (multiple) batch results
|
||||
config.add_route('{}.execute_results'.format(route_prefix), '{}/execute-results'.format(url_prefix))
|
||||
config.add_view(cls, attr='execute_results', route_name='{}.execute_results'.format(route_prefix),
|
||||
permission='{}.execute_multiple'.format(permission_prefix))
|
||||
config.add_tailbone_permission(permission_prefix, '{}.execute_multiple'.format(permission_prefix),
|
||||
"Execute multiple {}".format(model_title_plural))
|
||||
if cls.results_executable:
|
||||
config.add_route('{}.execute_results'.format(route_prefix), '{}/execute-results'.format(url_prefix))
|
||||
config.add_view(cls, attr='execute_results', route_name='{}.execute_results'.format(route_prefix),
|
||||
permission='{}.execute_multiple'.format(permission_prefix))
|
||||
config.add_tailbone_permission(permission_prefix, '{}.execute_multiple'.format(permission_prefix),
|
||||
"Execute multiple {}".format(model_title_plural))
|
||||
|
||||
|
||||
class FileBatchMasterView(BatchMasterView):
|
||||
|
|
|
@ -79,6 +79,7 @@ class HandheldBatchView(FileBatchMasterView):
|
|||
url_prefix = '/batch/handheld'
|
||||
execution_options_schema = ExecutionOptions
|
||||
editable = False
|
||||
results_executable = True
|
||||
|
||||
model_row_class = model.HandheldBatchRow
|
||||
rows_creatable = False
|
||||
|
|
|
@ -49,6 +49,7 @@ class LabelBatchView(BatchMasterView):
|
|||
rows_editable = True
|
||||
rows_bulk_deletable = True
|
||||
cloneable = True
|
||||
results_executable = True
|
||||
|
||||
row_grid_columns = [
|
||||
'sequence',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue