From 8c982c2b1427f283c5645f1de44d7e479ee95c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 26 Nov 2015 19:23:09 +0100 Subject: [PATCH] backoffice: remove legacy unused $formdef/pending page (#9126) --- wcs/backoffice/management.py | 46 -------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/wcs/backoffice/management.py b/wcs/backoffice/management.py index c2a3585..2a17d15 100644 --- a/wcs/backoffice/management.py +++ b/wcs/backoffice/management.py @@ -1068,52 +1068,6 @@ class FormPage(Directory): return r.getvalue() - def pending(self): - self.check_access() - get_logger().info('backoffice - form %s - pending' % self.formdef.name) - get_response().breadcrumb.append( ('pending', _('Pending Forms')) ) - html_top('management', '%s - %s' % (_('Pending Forms'), self.formdef.name)) - r = TemplateIO(html=True) - r += htmltext('

%s - %s

') % (self.formdef.name, _('Pending Forms')) - - not_endpoint_status = [('wf-%s' % x.id, x.name) for x in \ - self.formdef.workflow.get_not_endpoint_status()] - - nb_status = len(not_endpoint_status) - column2 = nb_status/2 - r += htmltext('
') - for i, (status_id, status_label) in enumerate(not_endpoint_status): - if i > 0 and i == column2: - r += htmltext('
') - r += htmltext('
') - status_forms = self.formdef.data_class().get_with_indexed_value( - str('status'), status_id) - if not status_forms: - continue - status_forms.sort(lambda x, y: cmp(getattr(x, str('receipt_time')), - getattr(y, str('receipt_time')))) - status_forms.reverse() - r += htmltext('
') - r += htmltext('

%s

') % _('Forms with status "%s"') % status_label - - r += htmltext('
    ') - for f in status_forms: - try: - u = get_publisher().user_class.get(f.user_id) - userlabel = u.display_name - except KeyError: - userlabel = _('unknown user') - r += htmltext('
  • %s, %s
  • ') % ( - f.id, - misc.localstrftime(f.receipt_time), - userlabel) - r += htmltext('
') - r += htmltext('
') - r += htmltext('
') - - r += htmltext('

%s

') % _('Back') - return r.getvalue() - def csv_tuple_heading(self, fields): heading_fields = [] # '#id', _('time'), _('userlabel'), _('status')] for field in fields: -- 2.6.2