Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
eefab03a
Commit
eefab03a
authored
May 26, 2017
by
Julian Rother
Browse files
Indicate currently live stream in upcomming panel, closes #302
parent
40179d30
Changes
2
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
eefab03a
...
...
@@ -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
:
...
...
templates/index.html
View file @
eefab03a
...
...
@@ -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,
Fals
e)}}
{{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.nowliv
e)}}
</li>
{% endfor %}
</ul>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment