updates for stage 2
[edumed.git] / stage2 / templates / stage2 / participant.html
1 {% extends 'base.html' %}
2 {% load textile_pl from fnp_markup %}
3 {% load chunks %}
4
5 {% block title %}Drugi etap{% endblock %}
6
7 {% block body %}
8   <h1>Drugi etap Olimpiady Cyfrowej</h1>
9
10   {% chunk 'stage2_header' %}
11
12   {% for assignment in assignments %}
13     <h2>{{ assignment.title }} (do {{ assignment.deadline }})</h2>
14     <a href="{{ assignment.content_url }}"><strong>Zobacz treść zadania</strong></a>
15     <form method="POST" action="" enctype="multipart/form-data">
16       {% csrf_token %}
17       {% for form, attachment in assignment.attachment_forms %}
18         {{ form.assignment_id }}
19         <p><strong>{{ form.file.label }}:</strong></p>
20         <p>
21           {% if assignment.is_active %}{{ form.file }}{% endif %}
22           {% if attachment.file %}
23             <a href="{{ attachment.download_url }}">{{ attachment.filename }}</a>
24             ({{ attachment.file.size|filesizeformat }})
25           {% else %}
26             (nie wysłano pliku)
27           {% endif %}
28         </p>
29       {% endfor %}
30       {% for form in assignment.field_forms %}
31         {{ form.assignment_id }}
32         <p><strong>{{ form.value.label }}:</strong></p>
33         {{ form.value.errors }}
34         <p>
35           {% if assignment.is_active %}{{ form.value }}{% else %}{{ form.value.value }}{% endif %}
36         </p>
37       {% endfor %}
38       {% if assignment.is_active %}<input type="submit" value="Wyślij"/>{% endif %}
39     </form>
40   {% endfor %}
41
42
43 {% endblock %}