180 |
180 |
181 contents = [] |
181 contents = [] |
182 list_params = params.copy() |
182 list_params = params.copy() |
183 index = 0 |
183 index = 0 |
184 |
184 |
185 for choice in selection: |
185 for status, action in selection: |
186 # only select the requests that have been pre-accpeted |
186 # only select the requests that have been pre-accpeted |
187 filter['status'] = choice[0] |
187 filter['status'] = status |
|
188 |
|
189 name = status[0] if isinstance(status, list) else status |
188 |
190 |
189 list_params['list_description'] = ( |
191 list_params['list_description'] = ( |
190 DEF_APPLICATION_LIST_DESCRIPTION_FMT % ( |
192 DEF_APPLICATION_LIST_DESCRIPTION_FMT % ( |
191 {'name_plural': params['name_plural'], 'status': choice[0]})) |
193 {'name_plural': params['name_plural'], 'status': name})) |
192 list_params['list_action'] = choice[1] |
194 list_params['list_action'] = action |
193 |
195 |
194 list_content = list_helper.getListContent( |
196 list_content = list_helper.getListContent( |
195 request, list_params, filter, idx=index) |
197 request, list_params, filter, idx=index) |
196 |
198 |
197 contents += [list_content] |
199 contents += [list_content] |
221 |
223 |
222 if kwargs['scope_path']: |
224 if kwargs['scope_path']: |
223 filter['scope_path'] = kwargs['scope_path'] |
225 filter['scope_path'] = kwargs['scope_path'] |
224 |
226 |
225 # create the selection list |
227 # create the selection list |
226 selection = [('needs review', (redirects.getEditRedirect, params)), |
228 selection = [(['needs review', 'pre-accepted', 'pre-rejected'], |
|
229 (redirects.getEditRedirect, params)), |
227 ('accepted', (redirects.getApplicantRedirect, |
230 ('accepted', (redirects.getApplicantRedirect, |
228 {'url_name': params['group_url_name']})), |
231 {'url_name': params['group_url_name']})), |
229 ('rejected', (redirects.getPublicRedirect, params))] |
232 ('rejected', (redirects.getPublicRedirect, params))] |
230 |
233 |
231 return self._applicationListConstructor(request, params, page_name, |
234 return self._applicationListConstructor(request, params, page_name, |