Only show "toggle complete" buttons when viewing batch
i.e. just show simple value for e.g. delete batch page
This commit is contained in:
parent
6d27d0cfba
commit
62dca3d0b0
|
@ -242,7 +242,8 @@ class BatchMasterView(MasterView):
|
|||
f.set_label('status_code', "Status")
|
||||
|
||||
# complete
|
||||
f.set_renderer('complete', self.render_complete)
|
||||
if self.viewing:
|
||||
f.set_renderer('complete', self.render_complete)
|
||||
|
||||
# executed
|
||||
f.set_readonly('executed')
|
||||
|
@ -289,7 +290,8 @@ class BatchMasterView(MasterView):
|
|||
content = [HTML.literal("Yes" if batch.complete else "No")]
|
||||
|
||||
if not batch.executed:
|
||||
if self.request.has_perm('{}.edit'.format(self.get_permission_prefix())):
|
||||
permission_prefix = self.get_permission_prefix()
|
||||
if self.request.has_perm('{}.edit'.format(permission_prefix)):
|
||||
|
||||
if batch.complete:
|
||||
label = "Mark as NOT Complete"
|
||||
|
|
Loading…
Reference in a new issue