Skip to content

Commit 64f2acd

Browse files
authored
Merge pull request #43 from TalCohen/FixHousingQueuePosition
Housing queue position now shows a more intuitive message.
2 parents 19801d5 + ac21627 commit 64f2acd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

conditional/blueprints/dashboard.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,9 @@ def display_dashboard():
108108
housing['points'] = ldap_get_housing_points(user_name)
109109
housing['room'] = ldap_get_room_number(user_name)
110110
if housing['room'] == "N/A":
111-
housing['queue_pos'] = get_queue_position(user_name)
111+
housing['queue_pos'] = "%s / %s" % (get_queue_position(user_name), get_queue_length())
112112
else:
113-
housing['queue_pos'] = "On Floor"
114-
housing['queue_len'] = get_queue_length()
113+
housing['queue_pos'] = "N/A"
115114
else:
116115
housing = None
117116

conditional/templates/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ <h3 class="panel-title">Housing Status</h3>
240240
</tr>
241241
<tr>
242242
<td class="title">Housing Queue Position</td>
243-
<td><span class="pull-right">{{housing['queue_pos']}} / {{housing['queue_len']}}</span></td>
243+
<td><span class="pull-right">{{housing['queue_pos']}}</span></td>
244244
</tr>
245245
</tbody>
246246
</table>

0 commit comments

Comments
 (0)