course.html (1503B) download
1{% extends "layout.html" %}
2{% block content %}
3<article class="media content-section">
4 <div class="media-body">
5 <h2><a class="article-title" href="{{url_for('course', course_id=course.id)}}">
6 {{ course.name }}
7 {{ '(subscribed)' if course.id in subs }}
8 </a></h2>
9 <p><i>{{ course.description }}</i></p>
10 <p>wordt gegeven door {% for teacher in teachers if teacher.id == course.teacher_id %}{{ teacher.username }},{%
11 endfor %}</p>
12 <p>elke {{ ['maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag', 'zondag'][course.weekday] }}
13 {{ course.start }} uur t/m {{ course.end }} uur op locatie: <b>{{ course.location }}</b></p>
14 </div>
15 <div class="article-metadata">
16 {% if current_user.is_authenticated %}
17 {% if not subscribed %}
18 <form method="POST" action="">
19 {{ sub_form.hidden_tag() }}
20 <div class="form-group">
21 {{ sub_form.submit(class="btn btn-outline-info") }}
22 </div>
23 </form>
24 {% else %}
25 <form method="POST" action="">
26 {{ unsub_form.hidden_tag() }}
27 <div class="form-group">
28 {{ unsub_form.submit(class="btn btn-outline-info") }}
29 </div>
30 </form>
31 {%endif%}
32 {% else %}
33 <p><a href="{{ url_for('login') }}">Inloggen om in te schrijven</a></p>
34 {% endif %}
35 </div>
36</article>
37{% endblock content %}