1
1
{% extends "extend/base.html" %}
2
2
3
+ {% set can_sign = (info.onfloor and info.uid != packet.freshman.rit_username) or info.realm == "csh" %}
4
+
3
5
{% block body %}
4
6
< div class ="container main ">
5
7
< div class ="row mobile-hide ">
@@ -12,57 +14,60 @@ <h3 class="page-title">Active Packets</h3>
12
14
< div id ="eval-table ">
13
15
< div class ="card ">
14
16
< div class ="card-body table-fill ">
15
- < div class ="card-body table-fill ">
16
- < div class ="table-responsive ">
17
- < table id =" active_packets_table " class =" table table-striped no-bottom-margin " >
18
- < thead >
19
- < tr >
20
- < th > Name </ th >
21
- < th > Signatures </ th >
17
+ < div class ="table-responsive ">
18
+ < table id =" active_packets_table " class ="table table-striped no-bottom-margin ">
19
+ < thead >
20
+ < tr >
21
+ < th > Name </ th >
22
+ < th > Signatures </ th >
23
+ {% if can_sign %}
22
24
< th > Sign</ th >
23
- </ tr >
24
- </ thead >
25
- < tbody >
26
- {% for packet in packets %}
27
- {% if packet.is_open() %}
28
- < tr {% if packet.did_sign %}style ="background-color: #4caf505e " {% endif %} >
29
- < td >
30
- < a href ="/packet/{{ packet.freshman.rit_username }} ">
31
- < img class ="eval-user-img "
32
- alt ="{{ packet.freshman.name }} "
33
- src ="https://www.gravatar.com/avatar/freshmen?d=mp&f=y "
34
- width ="25 "
35
- height ="25 "/> {{ packet.freshman.name }} ({{ packet.freshman.rit_username }})
36
- </ a >
37
- </ td >
38
- < td data-sort ="{{ packet.total_signatures }} ">
39
- {% if packet.total_signatures == packet.required_signatures %}
40
- 💯 {# 100% emoji #}
25
+ {% endif %}
26
+ </ tr >
27
+ </ thead >
28
+ < tbody >
29
+ {% for packet in packets %}
30
+ {% if packet.is_open() %}
31
+ < tr {% if packet.did_sign %}style ="background-color: #4caf505e " {% endif %} >
32
+ < td >
33
+ < a href ="/packet/{{ packet.freshman.rit_username }} ">
34
+ < img class ="eval-user-img "
35
+ alt ="{{ packet.freshman.name }} "
36
+ src ="https://www.gravatar.com/avatar/freshmen?d=mp&f=y "
37
+ width ="25 "
38
+ height ="25 "/> {{ packet.freshman.name }}
39
+ ({{ packet.freshman.rit_username }})
40
+ </ a >
41
+ </ td >
42
+ < td data-sort ="{{ packet.total_signatures }} ">
43
+ {% if packet.total_signatures == packet.required_signatures %}
44
+ 💯 {# 100% emoji #}
45
+ {% else %}
46
+ {{ packet.total_signatures }}/
47
+ {{ packet.required_signatures }}
48
+ {% endif %}
49
+ </ td >
50
+ {% if can_sign %}
51
+ < td class ="sign-packet " align ="right ">
52
+ {% if not packet.did_sign %}
53
+ < button class ="btn btn-sm btn-primary sign-button "
54
+ data-freshman_uid ="{{ packet.freshman.rit_username }} "
55
+ data-freshman_name ="{{ packet.freshman.name }} ">
56
+ Sign
57
+ </ button >
41
58
{% else %}
42
- {{ packet.total_signatures }}/{{ packet.required_signatures }}
59
+ < button class ="btn btn-sm btn-primary signed-button "
60
+ disabled ="disabled "> < i
61
+ class ="fa fa-check "> </ i > Signed
62
+ </ button >
43
63
{% endif %}
44
64
</ td >
45
- {% if (info.onfloor and info.uid != packet.freshman.rit_username) or info.realm == "csh" %}
46
- < td class ="sign-packet " align ="right ">
47
- {% if not packet.did_sign %}
48
- < button class ="btn btn-sm btn-primary sign-button "
49
- data-freshman_uid ="{{ packet.freshman.rit_username }} "
50
- data-freshman_name ="{{ packet.freshman.name }} ">
51
- Sign
52
- </ button >
53
- {% else %}
54
- < button class ="btn btn-sm btn-primary signed-button " disabled ="disabled "> < i
55
- class ="fa fa-check "> </ i > Signed
56
- </ button >
57
- {% endif %}
58
- </ td >
59
- {% endif %}
60
- </ tr >
61
- {% endif %}
62
- {% endfor %}
63
- </ tbody >
64
- </ table >
65
- </ div >
65
+ {% endif %}
66
+ </ tr >
67
+ {% endif %}
68
+ {% endfor %}
69
+ </ tbody >
70
+ </ table >
66
71
</ div >
67
72
</ div >
68
73
</ div >
0 commit comments