Commit eefab03a authored by Julian Rother's avatar Julian Rother
Browse files

Indicate currently live stream in upcomming panel, closes #302

parent 40179d30
......@@ -337,9 +337,10 @@ def index():
start = date.today()
end = start + timedelta(days=7)
upcomming = query('''
SELECT lectures.*, "course" AS sep, courses.*
SELECT lectures.*, streams.active AS nowlive, "course" AS sep, courses.*
FROM lectures
JOIN courses ON (lectures.course_id = courses.id)
LEFT JOIN streams ON lectures.id = streams.lecture_id
WHERE (time > ?) AND (time < ?) AND (? OR (lectures.visible AND courses.visible AND courses.listed)) AND NOT lectures.norecording
ORDER BY time ASC LIMIT 30''', start, end, ismod())
for i in upcomming:
......
......@@ -111,7 +111,7 @@
<ul class="list-group" style="margin: 0px;">
{% for i in g.list %}
<li class="list-group-item list-group-item-condensed">
{{i.time|time}} <a href="{{url_for('course', handle=i.course.handle)}}">{{i.course.title}}</a>: <a href="{{url_for('course', handle=i.course.handle)}}#lecture-{{i.id}}">{{i.title}}</a> {{livelabel(i.live, False)}}
{{i.time|time}} <a href="{{url_for('course', handle=i.course.handle)}}">{{i.course.title}}</a>: <a href="{{url_for('course', handle=i.course.handle)}}#lecture-{{i.id}}">{{i.title}}</a> {{livelabel(i.live, i.nowlive)}}
</li>
{% endfor %}
</ul>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment