Added listing of accepted and rejected proposals to the organization proposal page.
authorLennard de Rijk <ljvderijk@gmail.com>
Sun, 19 Apr 2009 22:50:30 +0000
changeset 2254 416da888eaa6
parent 2253 ab216123bee7
child 2255 783e69b54d47
Added listing of accepted and rejected proposals to the organization proposal page. The link will redirect to the public page where comments can still be placed. Patch by: Madhusudan.C.S Reviewed by: Lennard de Rijk
app/soc/views/models/organization.py
--- a/app/soc/views/models/organization.py	Sun Apr 19 22:14:35 2009 +0000
+++ b/app/soc/views/models/organization.py	Sun Apr 19 22:50:30 2009 +0000
@@ -321,6 +321,34 @@
     new_list = lists.getListContent(
         request, new_params, filter, idx=2, need_content=True)
 
+    ap_params = list_params.copy() # accepted proposals
+
+    description = ugettext('List of accepted %s sent to %s ') % (
+        ap_params['name_plural'], org_entity.name)
+
+    ap_params['list_description'] = description
+    ap_params['list_action'] = (redirects.getPublicRedirect, ap_params)
+
+    filter = {'org': org_entity,
+              'status': 'accepted'}
+
+    ap_list = lists.getListContent(
+        request, ap_params, filter, idx=3, need_content=True)
+
+    rp_params = list_params.copy() # rejected proposals
+
+    description = ugettext('List of rejected %s sent to %s ') % (
+        rp_params['name_plural'], org_entity.name)
+
+    rp_params['list_description'] = description
+    rp_params['list_action'] = (redirects.getPublicRedirect, rp_params)
+
+    filter = {'org': org_entity,
+              'status': 'rejected'}
+
+    rp_list = lists.getListContent(
+        request, rp_params, filter, idx=4, need_content=True)
+
     ip_params = list_params.copy() # ineligible proposals
 
     description = ugettext('List of ineligible %s sent to %s ') % (
@@ -333,7 +361,7 @@
               'status': 'invalid'}
 
     ip_list = lists.getListContent(
-        request, ip_params, filter, idx=3, need_content=True)
+        request, ip_params, filter, idx=5, need_content=True)
 
     # fill contents with all the needed lists
     if new_list != None:
@@ -344,6 +372,12 @@
     if mentor_entity and mp_list != None:
       contents.append(mp_list)
 
+    if ap_list != None:
+      contents.append(ap_list)
+
+    if rp_list != None:
+      contents.append(rp_list)
+
     if ip_list != None:
       contents.append(ip_list)