Skip to content

Commit 8c568b0

Browse files
committed
Adding basic packet page
1 parent 2ede188 commit 8c568b0

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

packet/routes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from packet.utils import before_request
99
from . import auth, app
1010
from .models import Freshman
11+
from .ldap import ldap_get_eboard
1112

1213

1314
@app.route("/")
@@ -24,6 +25,14 @@ def index(info=None):
2425
return render_template("active_packets.html", info=info, freshmen=freshmen)
2526

2627

28+
@app.route("/packet/<uid>")
29+
@auth.oidc_auth
30+
@before_request
31+
def freshman_packet(uid, info=None):
32+
eboard = ldap_get_eboard()
33+
return render_template("packet.html", info=info, eboard=eboard)
34+
35+
2736
@app.route("/csh-auth/")
2837
@auth.oidc_auth
2938
def csh_auth_test():

packet/templates/packet.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{% extends "extend/base.html" %}
2+
3+
{% block body %}
4+
<div class="container main">
5+
<div class="row mobile-hide">
6+
<div class="col-sm-10">
7+
<h3 class="page-title">Packet Name</h3>
8+
</div>
9+
</div>
10+
<div id="eval-blocks">
11+
<div id="eval-table">
12+
<div class="card">
13+
<div class="card-body table-fill">
14+
<div class="card-body table-fill">
15+
<div class="table-responsive">
16+
<table class="table table-striped no-bottom-margin" data-module="table"
17+
data-searchable="true" data-sort-column="3" data-sort-order="asc"
18+
data-length-changable="true" data-paginated="false">
19+
<thead>
20+
<tr>
21+
<th>Name</th>
22+
<th>Signature</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
{% for m in eboard %}
27+
<tr>
28+
<td>
29+
<img class="eval-user-img" alt="{{ m['uid'] }}"
30+
src="https://profiles.csh.rit.edu/image/{{ m['uid'] }}"
31+
width="30"
32+
height="30"/> {{ m['name'] }}
33+
</td>
34+
<td>
35+
<span class="glyphicon glyphicon-ok-sign green eval-info-status"></span>
36+
{{ m['signed'] }}
37+
</td>
38+
</tr>
39+
{% endfor %}
40+
</tbody>
41+
</table>
42+
</div>
43+
</div>
44+
</div>
45+
</div>
46+
</div>
47+
</div>
48+
</div>
49+
{% endblock %}

0 commit comments

Comments
 (0)