Use slots allocated instead of adjustment in slots view
authorSverre Rabbelier <srabbelier@gmail.com>
Wed, 08 Apr 2009 22:20:00 +0000
changeset 2129 f6ca1647bff7
parent 2128 7da77549bdeb
child 2130 83f4fab7c556
Use slots allocated instead of adjustment in slots view Patch by: Sverre Rabbelier
app/soc/models/organization.py
app/soc/templates/soc/program/allocation/heading.html
app/soc/templates/soc/program/allocation/row.html
app/soc/views/models/organization.py
--- a/app/soc/models/organization.py	Wed Apr 08 22:19:24 2009 +0000
+++ b/app/soc/models/organization.py	Wed Apr 08 22:20:00 2009 +0000
@@ -62,6 +62,11 @@
   slots_desired.help_text = ugettext(
       'The amount of slots desired by this organization.')
 
+  slots_calculated = db.IntegerProperty(required=False, default=0,
+      verbose_name=ugettext('Slots calculated'))
+  slots_calculated.help_text = ugettext(
+      'The amount of slots calculated for this organization.')
+
   nr_applications = db.IntegerProperty(required=False, default=0,
       verbose_name=ugettext('Amount of applications received'))
   nr_applications.help_text = ugettext(
--- a/app/soc/templates/soc/program/allocation/heading.html	Wed Apr 08 22:19:24 2009 +0000
+++ b/app/soc/templates/soc/program/allocation/heading.html	Wed Apr 08 22:20:00 2009 +0000
@@ -5,5 +5,5 @@
   <th>#Mentors</th>
   <th>Locked?</th>
   <th>Slots</th>
-  <th>Adjustment</th>
+  <th>Raw</th>
 </tr>
--- a/app/soc/templates/soc/program/allocation/row.html	Wed Apr 08 22:19:24 2009 +0000
+++ b/app/soc/templates/soc/program/allocation/row.html	Wed Apr 08 22:20:00 2009 +0000
@@ -15,10 +15,5 @@
      size="3" value="0" onchange="javascript:assignSlots(this)"/>
     </div>
   </td>
-  <td>
-      <div class="slots" id="id_adjustment_count_{{ list.item.link_id }}">
-      <input type="text" id="id_spin_adjustment_count_{{ list.item.link_id }}"
-      size="3" value="0" onchange="javascript:assignAdjustment(this)"/>
-      </div>
-  </td>
+  <td><div class="raw">{{ list.item.slots_calculated }}</div></td>
 </tr>
--- a/app/soc/views/models/organization.py	Wed Apr 08 22:19:24 2009 +0000
+++ b/app/soc/views/models/organization.py	Wed Apr 08 22:20:00 2009 +0000
@@ -111,7 +111,8 @@
     new_params['group_applicant_url'] = True
     new_params['sans_link_id_public_list'] = True
 
-    new_params['extra_dynaexclude'] = ['slots', 'nr_applications', 'nr_mentors']
+    new_params['extra_dynaexclude'] = ['slots', 'slots_calculated',
+                                       'nr_applications', 'nr_mentors']
 
     patterns = []