Split list files between, review and rank.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 13 Aug 2009 03:26:45 +0530
changeset 45 9ffe957d6159
parent 44 6fda3f3cc873
child 46 e27c75dedbfb
Split list files between, review and rank.
app/projrev/views/proposal.py
app/templates/projrev/proposal/list.html
app/templates/projrev/proposal/review_list.html
--- a/app/projrev/views/proposal.py	Thu Aug 13 03:20:01 2009 +0530
+++ b/app/projrev/views/proposal.py	Thu Aug 13 03:26:45 2009 +0530
@@ -265,7 +265,7 @@
   context = {}
 
   if not micr_code:
-    template = 'projrev/proposal/list.html'
+    template = 'projrev/proposal/review_list.html'
     context['projects'] = []
     projects = Project.objects.all().exclude(
         status__exact='invalid').order_by('-last_updated_on')
--- a/app/templates/projrev/proposal/list.html	Thu Aug 13 03:20:01 2009 +0530
+++ b/app/templates/projrev/proposal/list.html	Thu Aug 13 03:26:45 2009 +0530
@@ -1,51 +1,22 @@
 {% extends "projrev/base.html" %}
-{% load review_helpers %}
-
-
 {% block content %}
 <div class="post">
   <div class="list">
   <table>
     <tr>
-      <th class="first">Serial No.</th>
-      <th>MICR Code</th>
-      <th>Title</th>
+      <th class="first">MICR Code</th>
       <th>Line Item</th>
       <th>Institution</th>
       <th>State</th>
       <th>District</th>
-      <th>Old Serial No.</th>
     </tr>
     {% for project in projects %}
-      {% if project.not_this_proposal %}
-      <div class='hidden' style="display: none;">
-        <div id='message_{{ project.project|serial_no:"new" }}' style='padding:10px; background:#fff;'>
-          This proposal is revised after you submitted a review. You will have to submit a new review to the revised proposal. Press the relevant button.<br />
-          <a href='{{ row_url }}{{ project.project.micr_code }}/{{ project.user_review.id }}'>Start with my previous review</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-          <a href='{{ row_url }}{{ project.project.micr_code }}'>Start a fresh review</a>
-        </div>
-      </div>
-      <script type="text/javascript">
-        $(document).ready(function () {
-          $('#getredirect_{{ project.project|serial_no:"new" }}').colorbox({width:"50%", inline:true, href:"#message_{{ project.project|serial_no:"new" }}", title:"What do you want to do?"});
-        });
-      </script>
-      {% endif %}
-      <tr class="row-a"><td>
-      {% if project.user_review %}
-      <a id='getredirect_{{ project.project|serial_no:"new" }}' href='{{ row_url }}{{ project.project.micr_code }}/{{ project.user_review.id }}'>
-      {% else %}
-      <a id='getredirect_{{ project.project|serial_no:"new" }}' href='{{ row_url }}{{ project.project.micr_code }}'>
-      {% endif %}
-        {{ project.project|serial_no:"new" }}
-        </td>
-        <td>{{ project.project.micr_code }}</td>
-        <td>{{ project.project.title }}</td>
-        <td>{{ project.project.line_item }}</td>
-        <td>{{ project.project.institution }}</td>
-        <td>{{ project.project.state }}</td>
-        <td>{{ project.project.district }}</td>
-        <td>{{ project.project|serial_no:"old" }}</td>
+      <tr class="row-a"><td><a href='{{ row_url }}{{ project.micr_code }}'>
+        {{ project.micr_code }}</td>
+        <td>{{ project.line_item }}</td>
+        <td>{{ project.institution }}</td>
+        <td>{{ project.state }}</td>
+        <td>{{ project.district }}</td>
       </a></tr>
     {% endfor %}
   </table>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/templates/projrev/proposal/review_list.html	Thu Aug 13 03:26:45 2009 +0530
@@ -0,0 +1,54 @@
+{% extends "projrev/base.html" %}
+{% load review_helpers %}
+
+
+{% block content %}
+<div class="post">
+  <div class="list">
+  <table>
+    <tr>
+      <th class="first">Serial No.</th>
+      <th>MICR Code</th>
+      <th>Title</th>
+      <th>Line Item</th>
+      <th>Institution</th>
+      <th>State</th>
+      <th>District</th>
+      <th>Old Serial No.</th>
+    </tr>
+    {% for project in projects %}
+      {% if project.not_this_proposal %}
+      <div class='hidden' style="display: none;">
+        <div id='message_{{ project.project|serial_no:"new" }}' style='padding:10px; background:#fff;'>
+          This proposal is revised after you submitted a review. You will have to submit a new review to the revised proposal. Press the relevant button.<br />
+          <a href='{{ row_url }}{{ project.project.micr_code }}/{{ project.user_review.id }}'>Start with my previous review</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+          <a href='{{ row_url }}{{ project.project.micr_code }}'>Start a fresh review</a>
+        </div>
+      </div>
+      <script type="text/javascript">
+        $(document).ready(function () {
+          $('#getredirect_{{ project.project|serial_no:"new" }}').colorbox({width:"50%", inline:true, href:"#message_{{ project.project|serial_no:"new" }}", title:"What do you want to do?"});
+        });
+      </script>
+      {% endif %}
+      <tr class="row-a"><td>
+      {% if project.user_review %}
+      <a id='getredirect_{{ project.project|serial_no:"new" }}' href='{{ row_url }}{{ project.project.micr_code }}/{{ project.user_review.id }}'>
+      {% else %}
+      <a id='getredirect_{{ project.project|serial_no:"new" }}' href='{{ row_url }}{{ project.project.micr_code }}'>
+      {% endif %}
+        {{ project.project|serial_no:"new" }}
+        </td>
+        <td>{{ project.project.micr_code }}</td>
+        <td>{{ project.project.title }}</td>
+        <td>{{ project.project.line_item }}</td>
+        <td>{{ project.project.institution }}</td>
+        <td>{{ project.project.state }}</td>
+        <td>{{ project.project.district }}</td>
+        <td>{{ project.project|serial_no:"old" }}</td>
+      </a></tr>
+    {% endfor %}
+  </table>
+  </div>
+</div>
+{% endblock content %}
\ No newline at end of file