Init
This commit is contained in:
22
app/templates/user/account.html
Normal file
22
app/templates/user/account.html
Normal file
@ -0,0 +1,22 @@
|
||||
{% extends 'user/tabs.html' %}
|
||||
{% load crispy_forms_filters %}
|
||||
|
||||
{% block title %}Puchar Dyrektora - zgłoś uczniów{% endblock %}
|
||||
|
||||
{% block tab %}
|
||||
<form class="is-flex is-flex-direction-column" method="POST">
|
||||
<div class="my-6 has-text-centered is-flex is-flex-direction-column">
|
||||
<span class="title">Zaktualizuj konto</span>
|
||||
<span class="subtitle">
|
||||
W celu zmiany adresu e-mail lub numeru telefonu przypisanego do konta prosimy
|
||||
o kontakt pod danym adresem e-mail: <b>puchar@lo5.bielsko.pl</b>
|
||||
</span>
|
||||
</div>
|
||||
{% csrf_token %}
|
||||
{{ form | crispy }}
|
||||
<div class="buttons mx-auto my-3">
|
||||
<button class="button is-success" type="submit">Zaktualizuj</button>
|
||||
<a class="button is-link" href="{% url 'password_change' %}" target="_blank" rel="noopener noreferrer">Zmień hasło</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
34
app/templates/user/submission.html
Normal file
34
app/templates/user/submission.html
Normal file
@ -0,0 +1,34 @@
|
||||
{% extends 'user/tabs.html' %}
|
||||
{% load crispy_forms_filters %}
|
||||
|
||||
{% block title %}Puchar Dyrektora - zgłoś uczniów{% endblock %}
|
||||
|
||||
{% block tab %}
|
||||
{% if students %}
|
||||
<div class="hero has-text-centered">
|
||||
<span class="title my-6">Zgłoszeni uczniowie</span>
|
||||
<table class="hero-body table is-striped is-narrow is-hoverable is-fullwidth">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Identyfikator</th>
|
||||
<th>Uczeń</th>
|
||||
<th>Klasa</th>
|
||||
{% if ongoing.scores_eliminations %}<th>Wynik uzyskany podczas eliminacji</th>{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
{% for student in students %}
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ student.identifier }}</th>
|
||||
<td>{{ student.name }} {{ student.surname }}</td>
|
||||
<td>{{ student.grade }}</td>
|
||||
{% if ongoing.scores_eliminations %}<td>{{ student.score_first | default:"-" }}</td>{% endif %}
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<span>Brak zgłoszonych uczniów</span>
|
||||
{% endif %}
|
||||
{% endblock %}
|
22
app/templates/user/submit.html
Normal file
22
app/templates/user/submit.html
Normal file
@ -0,0 +1,22 @@
|
||||
{% extends 'user/tabs.html' %}
|
||||
{% load crispy_forms_filters %}
|
||||
|
||||
{% block title %}Puchar Dyrektora - zgłoś uczniów{% endblock %}
|
||||
|
||||
{% block tab %}
|
||||
<form class="is-flex is-flex-direction-column" method="POST">
|
||||
<div class="my-6 has-text-centered is-flex is-flex-direction-column">
|
||||
<span class="title">Zgłoś uczniów</span>
|
||||
</div>
|
||||
{% csrf_token %}
|
||||
{{ formset.management_form | crispy }}
|
||||
{% for form in formset %}
|
||||
<div class="columns">
|
||||
<div class="column is-5">{{ form.name | as_crispy_field }}</div>
|
||||
<div class="column is-5">{{ form.surname | as_crispy_field }}</div>
|
||||
<div class="column is-2">{{ form.grade | as_crispy_field }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<button class="button is-success mx-auto" type="submit">Zgłoś</button>
|
||||
</form>
|
||||
{% endblock %}
|
28
app/templates/user/tabs.html
Normal file
28
app/templates/user/tabs.html
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Puchar Dyrektora - zgłoś uczniów{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="tabs mb-0 is-centered is-boxed">
|
||||
<ul>
|
||||
<li class="{{ account_tab }}">
|
||||
<a href="{% url 'account' %}">Konto</a>
|
||||
</li>
|
||||
{% if ongoing %}
|
||||
<li class="{{ submission_tab }}">
|
||||
<a href="{% url 'submission' %}">Zgłoszenie</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<a class="has-text-danger">Zgłoszenie niedostępne</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="is-centered">
|
||||
{% block tab %}{% endblock %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user