# HG changeset patch # User Lennard de Rijk # Date 1233915885 0 # Node ID 3bce6205e24ecd958cb07aff90f735f86d1fdb81 # Parent ab19a8ad375ffa1fc919640ed95de17aa4ecc6b1 Added pre-accpeted status to group_app. This can be used when we want to accept all org's at once. Instead of one by one. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r ab19a8ad375f -r 3bce6205e24e app/soc/models/group_app.py --- a/app/soc/models/group_app.py Fri Feb 06 10:21:18 2009 +0000 +++ b/app/soc/models/group_app.py Fri Feb 06 10:24:45 2009 +0000 @@ -99,8 +99,11 @@ # property containing the status of the application # completed means that the application has been processed into a real group + # pre-accepted is used to indicate that the application has been accepted + # but the group cannot be made yet. status = db.StringProperty(required=True, - choices=['accepted','rejected','ignored','needs review','completed'], + choices=['accepted','rejected','ignored','needs review','completed', + 'pre-accepted'], default='needs review', verbose_name=ugettext('Application Status')) diff -r ab19a8ad375f -r 3bce6205e24e app/soc/templates/soc/org_app/review.html --- a/app/soc/templates/soc/org_app/review.html Fri Feb 06 10:21:18 2009 +0000 +++ b/app/soc/templates/soc/org_app/review.html Fri Feb 06 10:24:45 2009 +0000 @@ -29,3 +29,14 @@ {% readonly_field_as_twoline_table_row entity.fields.ideas.label entity.ideas %} {% readonly_field_as_twoline_table_row entity.fields.contrib_template.label entity.contrib_template %} {% endblock %} +{% block buttons %} + + + + + + + + + +{% endblock buttons %} diff -r ab19a8ad375f -r 3bce6205e24e app/soc/views/helper/access.py --- a/app/soc/views/helper/access.py Fri Feb 06 10:21:18 2009 +0000 +++ b/app/soc/views/helper/access.py Fri Feb 06 10:24:45 2009 +0000 @@ -761,7 +761,8 @@ fields = { 'link_id': django_args['link_id'], - 'status' : ['needs review', 'accepted', 'rejected', 'ignored'] + 'status' : ['needs review', 'accepted', 'rejected', 'ignored', + 'pre-accepted'] } if 'scope_path' in django_args: diff -r ab19a8ad375f -r 3bce6205e24e app/soc/views/models/group_app.py --- a/app/soc/views/models/group_app.py Fri Feb 06 10:21:18 2009 +0000 +++ b/app/soc/views/models/group_app.py Fri Feb 06 10:24:45 2009 +0000 @@ -76,7 +76,7 @@ new_params['extra_django_patterns'] = patterns new_params['sidebar_additional'] = [ - ('/%(url_name)s/review' % params, + ('/%(url_name)s/review_overview' % params, 'Review %(name_plural)s' % params, 'review_overview')] new_params['extra_dynaexclude'] = ['applicant', 'backup_admin', 'status', @@ -190,6 +190,20 @@ aa_list = list_helper.getListContent( request, aa_params, filter, 1) + if is_developer: + # re use the old filter, but this time only for pre-accepted apps + filter['status'] = 'pre-accepted' + + pa_params = params.copy() # pre-accepted applications + + pa_params['list_description'] = ugettext( + "An overview of all pre-accepted %(name_plural)s.") % params + + pa_list = list_helper.getListContent( + request, pa_params, filter, 4) + + contents += [pa_list] + # get all the reviewed applications that were denied # re use the old filter, but this time only for denied apps @@ -257,7 +271,7 @@ if 'status' in get_dict.keys(): status_value = get_dict['status'] - if status_value in ['accepted', 'rejected', 'ignored']: + if status_value in ['accepted', 'rejected', 'ignored', 'pre-accepted']: # this application has been properly reviewed update the status # only update if the status changes @@ -312,6 +326,17 @@ uh_list = list_helper.getListContent( request, uh_params, filter, 1) + + # only select the requests that have been pre-accpeted + filter['status'] = 'pre-accepted' + + pa_params = params.copy() + pa_params['list_description'] = ugettext( + "An overview of all pre-accepted %(name_plural)s.") % params + pa_params ['list_action'] = (redirects.getReviewRedirect, params) + + pa_list = list_helper.getListContent( + request, pa_params, filter, 4) # only select the requests the have been rejected filter ['status'] = 'rejected' @@ -336,7 +361,7 @@ request, ign_params, filter, 3) # fill contents with all the needed lists - contents = [ur_list, uh_list, den_list, ign_list] + contents = [ur_list, uh_list, pa_list, den_list, ign_list] # call the _list method from base to display the list return self._list(request, params, contents, page_name)