Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jannik Hellenkamp
website
Commits
4b220db7
Commit
4b220db7
authored
8 years ago
by
Andreas Valder
Browse files
Options
Downloads
Patches
Plain Diff
added video overwiew with group by
parent
f07e215c
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
server.py
+5
-1
5 additions, 1 deletion
server.py
static/style.css
+1
-0
1 addition, 0 deletions
static/style.css
templates/macros.html
+23
-0
23 additions, 0 deletions
templates/macros.html
templates/videos.html
+68
-1
68 additions, 1 deletion
templates/videos.html
with
97 additions
and
2 deletions
server.py
+
5
−
1
View file @
4b220db7
...
...
@@ -86,7 +86,11 @@ def index():
@app.route
(
'
/videos
'
)
def
videos
():
return
render_template
(
'
videos.html
'
)
c
=
query
(
"
SELECT * FROM courses
"
)
for
i
in
c
:
if
i
[
'
semester
'
]
==
''
:
i
[
'
semester
'
]
=
'
zeitlos
'
return
render_template
(
'
videos.html
'
,
courses
=
c
,
groupedby
=
request
.
args
.
get
(
'
groupedby
'
))
@app.route
(
'
/faq
'
)
def
faq
():
...
...
This diff is collapsed.
Click to expand it.
static/style.css
+
1
−
0
View file @
4b220db7
.videopreview
li
:nth-child
(
even
)
{
background
:
#f5f5f5
;
}
.courses-list
li
:nth-child
(
even
)
{
background
:
#fAfAfA
;
}
.mejs-container
{
height
:
80%
!important
;
width
:
100%
!important
;
position
:
fixed
!important
;
}
This diff is collapsed.
Click to expand it.
templates/macros.html
+
23
−
0
View file @
4b220db7
...
...
@@ -56,3 +56,26 @@
<source
type=
"video/mp4"
src=
"https://videoag.fsmpi.rwth-aachen.de/{{ videos[0]['path'] }}"
/>
</video>
{% endmacro %}
{% macro course_list_item(course,show_semester=False) %}
<li
class=
"list-group-item"
>
<div
class=
"row"
>
{% if show_semester %}
<span
class=
"col-xs-1"
>
{{ course.semester }}
</span>
<span
class=
"col-xs-6"
>
{% else %}
<span
class=
"col-xs-7"
>
{% endif %}
{{ course.title }}
</span>
<span
class=
"col-xs-3"
>
{{ course.organizer }}
</span>
<span
class=
"col-xs-2"
>
{{ course.subject }}
</span>
</div>
</li>
{% endmacro %}
This diff is collapsed.
Click to expand it.
templates/videos.html
+
68
−
1
View file @
4b220db7
{% from 'macros.html' import course_list_item %}
{% set active_page = 'videos' -%}
{% set groupedby = groupedby|default('semester', true) -%}
{% extends "base.html" %}
{% set active_page = "videos" %}
{% block content %}
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<div
class=
"col-xs-12 dropdown"
>
<button
class=
"btn btn-primary dropdown-toggle"
type=
"button"
data-toggle=
"dropdown"
>
Grupierung
<span
class=
"caret"
></span></button>
<ul
class=
"dropdown-menu"
>
<li><a
href=
"?groupedby=semester"
>
Semester
</a></li>
<li><a
href=
"?groupedby=courses"
>
Veranstaltungen
</a></li>
<li><a
href=
"?groupedby=organizer"
>
Dozenten
</a></li>
</ul>
</div>
</div>
<div
class=
"row"
><div
class=
"col-xs-offset-1 col-xs-10"
>
{% if groupedby == 'semester' %}
{% for g in courses|groupby('semester')|reverse %}
<div
class=
"row panel-group"
>
<div
class=
"col-xs-12"
><div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h1
class=
"panel-title"
>
{{g.grouper}}
</h1>
</div>
<ul
class=
"courses-list list-group"
>
{% for i in g.list %}
{{ course_list_item(i) }}
{% endfor %}
</ul>
</div></div>
</div>
{% endfor %}
{% endif %}
{% if groupedby == 'courses' %}
{% for g in courses|groupby('title')|reverse %}
<div
class=
"row panel-group"
>
<div
class=
"col-xs-12"
><div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h1
class=
"panel-title"
>
{{g.grouper}}
</h1>
</div>
<ul
class=
"courses-list list-group"
>
{% for i in g.list|sort(attribute='semester') %}
{{ course_list_item(i,true) }}
{% endfor %}
</ul>
</div></div>
</div>
{% endfor %}
{% endif %}
{% if groupedby == 'organizer' %}
{% for g in courses|groupby('organizer')|reverse %}
<div
class=
"row panel-group"
>
<div
class=
"col-xs-12"
><div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h1
class=
"panel-title"
>
{{g.grouper}}
</h1>
</div>
<ul
class=
"courses-list list-group"
>
{% for i in g.list|sort(attribute='semester') %}
{{ course_list_item(i,true) }}
{% endfor %}
</ul>
</div></div>
</div>
{% endfor %}
{% endif %}
</div></div>
</div>
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment