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,6 +242,7 @@ class BatchMasterView(MasterView):
|
||||||
f.set_label('status_code', "Status")
|
f.set_label('status_code', "Status")
|
||||||
|
|
||||||
# complete
|
# complete
|
||||||
|
if self.viewing:
|
||||||
f.set_renderer('complete', self.render_complete)
|
f.set_renderer('complete', self.render_complete)
|
||||||
|
|
||||||
# executed
|
# executed
|
||||||
|
@ -289,7 +290,8 @@ class BatchMasterView(MasterView):
|
||||||
content = [HTML.literal("Yes" if batch.complete else "No")]
|
content = [HTML.literal("Yes" if batch.complete else "No")]
|
||||||
|
|
||||||
if not batch.executed:
|
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:
|
if batch.complete:
|
||||||
label = "Mark as NOT Complete"
|
label = "Mark as NOT Complete"
|
||||||
|
|
Loading…
Reference in a new issue