app/soc/views/models/group_app.py
changeset 1246 756fd7195213
parent 1244 20494064bc3f
child 1248 f318538394d9
equal deleted inserted replaced
1245:3c6b7b5b5ff6 1246:756fd7195213
    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)$',
    69     patterns = [(r'^%(url_name)s/(?P<access_type>review_overview)/%(scope)s$',
    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')]
       
    81 
    77 
    82     new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'status',
    78     new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'status',
    83         'created_on', 'last_modified_on']
    79         'created_on', 'last_modified_on']
    84 
    80 
    85     new_params['create_extra_dynafields'] = {
    81     new_params['create_extra_dynafields'] = {
   303     status of the application process.
   299     status of the application process.
   304     """
   300     """
   305 
   301 
   306     params = dicts.merge(params, self._params)
   302     params = dicts.merge(params, self._params)
   307 
   303 
       
   304     filter = {}
       
   305 
       
   306     if kwargs['scope_path']:
       
   307       filter['scope_path'] = kwargs['scope_path']
       
   308 
   308     # only select the requests that haven't been reviewed yet
   309     # only select the requests that haven't been reviewed yet
   309     filter = {'status' : 'needs review'}
   310     filter['status'] = 'needs review'
   310 
   311 
   311     ur_params = params.copy()
   312     ur_params = params.copy()
   312     ur_params['list_description'] = ugettext('A list of all unhandled '
   313     ur_params['list_description'] = ugettext('A list of all unhandled '
   313         '%(name_plural)s.') % params
   314         '%(name_plural)s.') % params
   314     ur_params ['list_action'] = (redirects.getReviewRedirect, params)
   315     ur_params ['list_action'] = (redirects.getReviewRedirect, params)