Use slots allocated instead of adjustment in slots view
Patch by: Sverre Rabbelier
--- 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 = []