64 |
64 |
65 # use the twoline templates for these questionnaires |
65 # use the twoline templates for these questionnaires |
66 new_params['create_template'] = 'soc/models/twoline_edit.html' |
66 new_params['create_template'] = 'soc/models/twoline_edit.html' |
67 new_params['edit_template'] = 'soc/models/twoline_edit.html' |
67 new_params['edit_template'] = 'soc/models/twoline_edit.html' |
68 |
68 |
69 patterns = [(r'^%(url_name)s/(?P<access_type>review_overview)/%(scope)s$', |
69 patterns = [(r'^%(url_name)s/(?P<access_type>review_overview)$', |
70 'soc.views.models.%(module_name)s.review_overview', |
70 'soc.views.models.%(module_name)s.review_overview', |
71 'Review %(name_plural)s'), |
71 'Review %(name_plural)s'), |
72 (r'^%(url_name)s/(?P<access_type>review)/%(key_fields)s$', |
72 (r'^%(url_name)s/(?P<access_type>review)/%(key_fields)s$', |
73 'soc.views.models.%(module_name)s.review', |
73 'soc.views.models.%(module_name)s.review', |
74 'Review %(name_short)s')] |
74 'Review %(name_short)s')] |
75 |
75 |
76 new_params['extra_django_patterns'] = patterns |
76 new_params['extra_django_patterns'] = patterns |
|
77 |
|
78 new_params['sidebar_additional'] = [ |
|
79 ('/%(url_name)s/review_overview' % params, |
|
80 'Review %(name_plural)s' % params, 'review_overview')] |
77 |
81 |
78 new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'status', |
82 new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'status', |
79 'created_on', 'last_modified_on'] |
83 'created_on', 'last_modified_on'] |
80 |
84 |
81 new_params['create_extra_dynafields'] = { |
85 new_params['create_extra_dynafields'] = { |
299 status of the application process. |
303 status of the application process. |
300 """ |
304 """ |
301 |
305 |
302 params = dicts.merge(params, self._params) |
306 params = dicts.merge(params, self._params) |
303 |
307 |
304 filter = {} |
|
305 |
|
306 if kwargs['scope_path']: |
|
307 filter = {'scope_path': kwargs['scope_path']} |
|
308 |
|
309 # only select the requests that haven't been reviewed yet |
308 # only select the requests that haven't been reviewed yet |
310 filter['status'] = 'needs review' |
309 filter = {'status' : 'needs review'} |
311 |
310 |
312 ur_params = params.copy() |
311 ur_params = params.copy() |
313 ur_params['list_description'] = ugettext('A list of all unhandled ' |
312 ur_params['list_description'] = ugettext('A list of all unhandled ' |
314 '%(name_plural)s.') % params |
313 '%(name_plural)s.') % params |
315 ur_params ['list_action'] = (redirects.getReviewRedirect, params) |
314 ur_params ['list_action'] = (redirects.getReviewRedirect, params) |
335 pa_params['list_description'] = ugettext( |
334 pa_params['list_description'] = ugettext( |
336 "An overview of all pre-accepted %(name_plural)s.") % params |
335 "An overview of all pre-accepted %(name_plural)s.") % params |
337 pa_params ['list_action'] = (redirects.getReviewRedirect, params) |
336 pa_params ['list_action'] = (redirects.getReviewRedirect, params) |
338 |
337 |
339 pa_list = list_helper.getListContent( |
338 pa_list = list_helper.getListContent( |
340 request, pa_params, filter, 2) |
339 request, pa_params, filter, 4) |
341 |
340 |
342 # only select the requests the have been rejected |
341 # only select the requests the have been rejected |
343 filter ['status'] = 'rejected' |
342 filter ['status'] = 'rejected' |
344 |
343 |
345 den_params = params.copy() |
344 den_params = params.copy() |
346 den_params['list_description'] = ugettext('A list of all %(name_plural)s ' |
345 den_params['list_description'] = ugettext('A list of all %(name_plural)s ' |
347 'that have been rejected') % params |
346 'that have been rejected') % params |
348 den_params ['list_action'] = (redirects.getReviewRedirect, params) |
347 den_params ['list_action'] = (redirects.getReviewRedirect, params) |
349 |
348 |
350 den_list = list_helper.getListContent( |
349 den_list = list_helper.getListContent( |
351 request, den_params, filter, 3) |
350 request, den_params, filter, 2) |
352 |
351 |
353 # only select the request that have been ignored |
352 # only select the request that have been ignored |
354 filter ['status'] = 'ignored' |
353 filter ['status'] = 'ignored' |
355 |
354 |
356 ign_params = params.copy() |
355 ign_params = params.copy() |
357 ign_params['list_description'] = ugettext('A list of all %(name_plural)s ' |
356 ign_params['list_description'] = ugettext('A list of all %(name_plural)s ' |
358 'that have been ignored') % params |
357 'that have been ignored') % params |
359 ign_params ['list_action'] = (redirects.getReviewRedirect, params) |
358 ign_params ['list_action'] = (redirects.getReviewRedirect, params) |
360 |
359 |
361 ign_list = list_helper.getListContent( |
360 ign_list = list_helper.getListContent( |
362 request, ign_params, filter, 4) |
361 request, ign_params, filter, 3) |
363 |
362 |
364 # fill contents with all the needed lists |
363 # fill contents with all the needed lists |
365 contents = [ur_list, uh_list, pa_list, den_list, ign_list] |
364 contents = [ur_list, uh_list, pa_list, den_list, ign_list] |
366 |
365 |
367 # call the _list method from base to display the list |
366 # call the _list method from base to display the list |