backoffice: add possibility to filter on 'done' status (opposite of pending)
This commit is contained in:
parent
e0ad0b08af
commit
a861d290b0
|
@ -255,7 +255,7 @@ class FormPage(Directory):
|
|||
if self.formdef.workflow.possible_status:
|
||||
'<h3>%s</h3>' % _('Filters')
|
||||
'<ul>'
|
||||
filters = [('all', _('All')), ('pending', _('Pending'))]
|
||||
filters = [('all', _('All')), ('pending', _('Pending')), ('done', _('Done'))]
|
||||
for status in self.formdef.workflow.possible_status:
|
||||
filters.append((status.id, status.name))
|
||||
for filter_id, filter_label in filters:
|
||||
|
|
|
@ -89,6 +89,9 @@ class FormDefUI:
|
|||
if selected_filter == 'pending':
|
||||
applied_filters = ['wf-%s' % x.id for x in \
|
||||
self.formdef.workflow.get_not_endpoint_status()]
|
||||
elif selected_filter == 'done':
|
||||
applied_filters = ['wf-%s' % x.id for x in \
|
||||
self.formdef.workflow.get_endpoint_status()]
|
||||
else:
|
||||
applied_filters = ['wf-%s' % selected_filter]
|
||||
items = []
|
||||
|
|
Loading…
Reference in New Issue