stage 2: nice button
[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 %}II etap{% endblock %}
6
7 {% block body %}
8   <h1>II etap Olimpiady Cyfrowej</h1>
9
10   {% chunk 'stage2_header' %}
11
12   {% for assignment in assignments %}
13     {% if assignment.title %}
14       <h2>{{ assignment.title }} (do {{ assignment.deadline }})</h2>
15     {% endif %}
16     <p class="box-button" style="max-width: 15em;">
17       <a href="{{ assignment.content_url }}" target="_blank" class="nice-button"><strong>Zobacz treść zadania</strong></a>
18     </p>
19     <form method="POST" action="" enctype="multipart/form-data" class="submit-form">
20       {% csrf_token %}
21       {% for form, attachment in assignment.attachment_forms %}
22         {{ form.assignment_id }}
23         <p><strong>{{ form.file.label }}:</strong></p>
24         <p>
25           {% if assignment.is_active %}{{ form.file }}{% endif %}
26           {% if attachment.file %}
27             <a href="{{ attachment.download_url }}">{{ attachment.filename }}</a>
28             ({{ attachment.file.size|filesizeformat }})
29           {% else %}
30             (nie wysłano pliku)
31           {% endif %}
32         </p>
33       {% endfor %}
34       {% for form in assignment.field_forms %}
35         {{ form.assignment_id }}
36         <p><strong>{{ form.value.label }}:</strong></p>
37         {{ form.value.errors }}
38         <p>
39           {% if assignment.is_active %}{{ form.value }}{% else %}{{ form.value.value }}{% endif %}
40         </p>
41       {% endfor %}
42       {% if assignment.is_active %}<input type="submit" value="Zapisz"/>{% endif %}
43     </form>
44   {% endfor %}
45
46
47 {% endblock %}