Skip to content
Snippets Groups Projects
Commit 550c25fa authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Rewrite templates

parent 68b2816c
No related branches found
No related tags found
1 merge request!1Reformat and cleanup
Showing
with 272 additions and 27 deletions
{% extends "core/base.html" %}
{% load material_form i18n any_js %}
{% block page_title %}{% blocktrans %}Create event{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Create event{% endblocktrans %}{% endblock %}
{% block extra_head %}
{{ form.media.css }}
{% include_css "select2-materialize" %}
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{% form form=form %}{% endform %}
{% include "core/partials/save_button.html" %}
</form>
{% include_js "select2-materialize" %}
{{ form.media.js }}
{% endblock %}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
{% block browser_title %}{% blocktrans %}Edit event{% endblocktrans %}{% endblock %} {% block browser_title %}{% blocktrans %}Edit event{% endblocktrans %}{% endblock %}
{% block extra_head %} {% block extra_head %}
{{ edit_event_form.media.css }} {{ form.media.css }}
{% include_css "select2-materialize" %} {% include_css "select2-materialize" %}
{% endblock %} {% endblock %}
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
{% form form=edit_event_form %}{% form %} {% form form=form %}{% form %}
{% include "core/partials/save_button.html" %} {% include "core/partials/save_button.html" %}
</form> </form>
{% include_js "select2-materialize" %} {% include_js "select2-materialize" %}
{{ edit_event_form.media.js }} {{ form.media.js }}
{% endblock %} {% endblock %}
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
{% block page_title %}{% blocktrans %}Feedback on an event{% endblocktrans %}{% endblock %} {% block page_title %}{% blocktrans %}Feedback on an event{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Feedback on an event{% endblocktrans %}{% endblock %} {% block browser_title %}{% blocktrans %}Feedback on an event{% endblocktrans %}{% endblock %}
{% block extra_head %}
{{ form.media.css }}
{% endblock %}
{% block content %} {% block content %}
<h5> <h5>
{% blocktrans %}Feedback on{% endblocktrans %} {{ event.display_name }} {% blocktrans %}Feedback on{% endblocktrans %} {{ event.display_name }}
...@@ -43,4 +47,6 @@ ...@@ -43,4 +47,6 @@
{% form form=feedback_form %}{% endform %} {% form form=feedback_form %}{% endform %}
{% include "core/partials/save_button.html" %} {% include "core/partials/save_button.html" %}
</form> </form>
{{ form.media.js }}
{% endblock %} {% endblock %}
{% extends "core/base.html" %}
{% load material_form i18n any_js coerce static %}
{% block browser_title %}{% blocktrans %}Event{% endblocktrans %} {{ event.display_name }}{% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="{% static 'css/paweljong.css' %}"/>
{% endblock %}
{% block content %}
<div class="card">
<div class="card-content">
<div class="row">
<div class="col s1">
<time datetime="{{ event.date_event|date:'Y-m-d' }}" class="icon">
<em>{{ event.date_event|date:'l' }}</em>
<strong>{{ event.date_event|date:'F' }}</strong>
<span>{{ event.date_event|date:'d' }}</span>
</time>
</div>
<div class="col s11">
<span class="card-title">
{{ event.display_name }}
</span>
<ul>
<li>
{{ event.description }}
</li>
<br />
<li>
{% blocktrans %}
The event takes place in <strong>{{ event.place }}</strong>
(Information on overnight stays and shared trips see description)
{% endblocktrans %}
</li>
<li>
Registration possible until <strong>{{ event.date_registration }}</strong>
</li>
<li>
Cost: <strong>{{ event.cost }} €</strong> incl. program, overnight stays, trips and meals
(if part of the event)
</li>
<li>
Booked participants slots: <strong>{{ event.linked_group.members.count }} of {{ event.max_participants }}</strong>
</li>
<div class="progress">
<div class="determinate" style="min-width: 2em;width:{{ event.booked_percentage|coerce_max:100|floatformat:0 }}%">
</div>
</div>
<p class="center">{{ event.booked_percentage|coerce_max:100 }} %</p>
</ul>
</div>
</div>
</div>
<div class="card-tabs">
<ul class="tabs tabs-fixed-width">
{% if can_register %}
<li class="tab">
<a href="#with_email">
Register now (i have an email)
</a>
</li>
<li class="tab">
<a href="#without_email">
Register now (i don't have an email)
</a>
</li>
{% else %}
<li class="tab">
<a href="#not_possible">{% trans "Not available" %}</a>
</li>
{% endif %}
</div>
<div class="card-content grey lighten-4">
{% if can_register %}
<div id="with_email">
<p>Lorem Ipsum dolor sit amet (mit Mail)</p>
</div>
<div id="without_email">
<p>Lorem Ipsum dolor sit amet (ohne Mail)</p>
</div>
{% else %}
<div id="not_possible">
<p>
{% blocktrans %}
Registration is no longer possible.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{{ event.information | safe }}
{% endblock %}
{% extends "core/base.html" %} {% extends "core/base.html" %}
{% load i18n %} {% load material_form i18n %}
{% load render_table from django_tables2 %} {% load render_table from django_tables2 %}
{% block page_title %}{% blocktrans %}Manage events{% endblocktrans %}{% endblock %} {% block page_title %}{% blocktrans %}Manage events{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Manage events{% endblocktrans %}{% endblock %} {% block browser_title %}{% blocktrans %}Manage events{% endblocktrans %}{% endblock %}
{% block content %} {% block content %}
<h5>
{% blocktrans %}Upcoming events{% endblocktrans %}
</h5>
{% render_table object_list %} <h5>{% trans "Filter events" %}</h5>
<form method="get">
{% form form=events_filter.form %}{% endform %}
{% trans "Search" as caption %}
{% include "core/partials/save_button.html" with caption=caption icon="search" %}
<button type="reset" class="btn red waves-effect waves-light">
<i class="material-icons left">clear</i>
{% trans "Clear" %}
</button>
</form>
<h5>{% trans "Selected events" %}</h5>
{% render_table events_table %}
{% endblock %} {% endblock %}
{% extends "core/base.html" %}
{% load material_form i18n %}
{% block browser_title %}{{ browser_title }}{% endblock %}
{% block page_title %}{{ page_title }}{% endblock %}
{% block content %}
<div class="row">
<div class="col s12">
<div class="card info">
<div class="card-content">
<span class="card-title">{{ info_title }}</span>
<p>
{{ info_text }}
</p>
</div>
</div>
</div>
</div>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ wizard.form.media }}
{{ wizard.management_form }}
{% if wizard.form.forms %}
{{ wizard.form.management_form }}
{% for form in wizard.form.forms %}
{% form form=form %}{% endform %}
{% endfor %}
{% else %}
{% form form=wizard.form %}{% endform %}
{% endif %}
{% if wizard.steps.prev %}
<button type="submit" value="{{ wizard.steps.first }}" class="btn waves-effect waves-light color-primary" name="wizard_goto_step">
<i class="material-icons left">first_page</i>
{% trans "first step" %}
</button>
<button type="submit" value="{{ wizard.steps.prev }}" class="btn waves-effect waves-light color-secondary" name="wizard_goto_step">
<i class="material-icons left">arrow_back_ios</i>
{% trans "previous step" %}
</button>
{% endif %}
{% trans "Next" as caption %}
{% include "core/partials/save_button.html" with caption=caption icon="navigate_next" %}
</form>
{% endblock %}
{% extends "core/base.html" %}
{% load material_form i18n %}
{% block page_title %}{% blocktrans %}Registered successfully{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Registered successfully{% endblocktrans %}{% endblock %}
{% block content %}
{{ form_data }}
{% endblock %}
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
{% if can_manage_registration or can_manage_registration_preferences or can_delete_registration %} {% if can_manage_registration or can_manage_registration_preferences or can_delete_registration %}
<p> <p>
{% if can_manage_registration %} {% if can_manage_registration %}
<a href="{% url 'edit_registration_by_id' registration.id %}" class="btn waves-effect waves-light"> <a href="{% url 'edit_registration_by_pk' registration.pk %}" class="btn waves-effect waves-light">
<i class="material-icons left">edit</i> <i class="material-icons left">edit</i>
{% trans "Edit" %} {% trans "Edit" %}
</a> </a>
{% endif %} {% endif %}
{% if can_delete_registration %} {% if can_delete_registration %}
<a href="{% url 'delete_registration_by_id' registration.id %}" class="btn waves-effect waves-light red"> <a href="{% url 'delete_registration_by_pk' registration.pk %}" class="btn waves-effect waves-light red">
<i class="material-icons left">delete</i> <i class="material-icons left">delete</i>
{% trans "Delete" %} {% trans "Delete" %}
</a> </a>
...@@ -107,23 +107,35 @@ ...@@ -107,23 +107,35 @@
<td> <td>
<i class="material-icons small">local_activity</a> <i class="material-icons small">local_activity</a>
</td> </td>
<td colspan="3"><a href="{% url 'edit_event_by_id' registration.event.id %}">{{ registration.event }}</a></td> <td colspan="3"><a href="{% url 'edit_event_by_pk' registration.event.pk %}">{{ registration.event }}</a></td>
</tr> </tr>
<tr> <tr>
<td> <td>
<i class="material-icons small">redeem</a> <i class="material-icons small">redeem</i>
</td> </td>
<td colspan="3">{{ registration.donation }}</td> <td colspan="3">{{ registration.donation }}</td>
</tr> </tr>
<tr> <tr>
<td> <td>
<i class="material-icons small">payment</a> <i class="material-icons small">payment</i>
</td> </td>
<td>{% trans "SEPA direct debit" %}: {{ registration.accept_sepa }}</td> <td>{% trans "SEPA direct debit" %}: {{ registration.accept_sepa }}</td>
{% if registration.accept_sepa %} {% if registration.accept_sepa %}
<td>{% trans "IBAN" %}: {{ registration.iban }}</td> <td>{% trans "IBAN" %}: {{ registration.iban }}</td>
{% endif %} {% endif %}
</tr> </tr>
{% if registration.extended_data %}
{% for field, value in registration.extended_data.items %}
<tr>
<td>
{{ field }}
</td>
<td>
{{ value }}
</td>
</tr>
{% endfor %}
{% endif %}
</table> </table>
</p> </p>
</div> </div>
......
{% extends "core/base.html" %}
{% load material_form i18n %}
{% block page_title %}{% blocktrans %}Create feedback aspect{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Create feedback aspect{% endblocktrans %}{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{% form form=form %}{% endform %}
{% include "core/partials/save_button.html" %}
</form>
{% endblock %}
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
{% block content %} {% block content %}
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
{% form form=edit_feedback_aspect_form %}{% endform %} {% form form=form %}{% endform %}
{% include "core/partials/save_button.html" %} {% include "core/partials/save_button.html" %}
</form> </form>
{% endblock %} {% endblock %}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{% endblock %} {% endblock %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="{% static 'ticdesk.css' %}"> <link rel="stylesheet" href="{% static 'css/paweljong.css' %}"/>
{% endblock %} {% endblock %}
{% block browser_title %}{{ group }} — {% trans "Corona" %}{% endblock %} {% block browser_title %}{{ group }} — {% trans "Corona" %}{% endblock %}
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{% endblock %} {% endblock %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="{% static 'ticdesk.css' %}"> <link rel="stylesheet" href="{% static 'css/paweljong.css' %}"/>
{% endblock %} {% endblock %}
{% block browser_title %}{{ group }} — {% trans "attendance list" %}{% endblock %} {% block browser_title %}{{ group }} — {% trans "attendance list" %}{% endblock %}
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{% endblock %} {% endblock %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="{% static 'css/ticdesk/ticdesk.css' %}"> <link rel="stylesheet" href="{% static 'css/paweljong.css' %}"/>
{% endblock %} {% endblock %}
{% block browser_title %}{{ group }} — {% trans "participant list" %}{% endblock %} {% block browser_title %}{{ group }} — {% trans "participant list" %}{% endblock %}
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
<th class="table-print">{% trans "First name" %}</th> <th class="table-print">{% trans "First name" %}</th>
<th class="table-print">{% trans "Date of birth" %}</th> <th class="table-print">{% trans "Date of birth" %}</th>
<th class="table-print">{% trans "Mobile number" %}</th> <th class="table-print">{% trans "Mobile number" %}</th>
<th class="table-print">{% trans "School" %}</th>
<th class="table-print">{% trans "Class" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -43,8 +41,6 @@ ...@@ -43,8 +41,6 @@
<td class="table-print">{{ person.first_name }}</td> <td class="table-print">{{ person.first_name }}</td>
<td class="table-print">{{ person.date_of_birth }}</td> <td class="table-print">{{ person.date_of_birth }}</td>
<td class="table-print">{{ person.mobile_number }}</td> <td class="table-print">{{ person.mobile_number }}</td>
<td class="table-print">{{ person.school }}</td>
<td class="table-print">{{ person.school_class }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
{% endblock %} {% endblock %}
{% block extra_head %} {% block extra_head %}
<link rel="stylesheet" href="{% static 'ticdesk.css' %}"> <link rel="stylesheet" href="{% static 'css/paweljong.css' %}"/>
{% endblock %} {% endblock %}
{% block browser_title %}{{ group }} — {% trans "signature list" %}{% endblock %} {% block browser_title %}{{ group }} — {% trans "signature list" %}{% endblock %}
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
{% trans "Voucher for "%} {{ voucher.event }} {% trans "Voucher for "%} {{ voucher.event }}
{% endblock %} {% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="{% static 'css/paweljong.css' %}"/>
{% endblock %}
{% block browser_title %}{% trans "Voucher for "%} {{ voucher.event }}{% endblock %} {% block browser_title %}{% trans "Voucher for "%} {{ voucher.event }}{% endblock %}
{% block content %} {% block content %}
...@@ -14,7 +18,7 @@ ...@@ -14,7 +18,7 @@
<h3>{{ voucher.event }}<h3> <h3>{{ voucher.event }}<h3>
<h4>{{ voucher.code }}</h4> <h4>{{ voucher.code }}</h4>
<p>{% trans "Voucher for" %} {{ voucher.person.first_name }} {{ voucher.person.last_name }} {% trans "to visit event" %} {{ voucher.event }} {% trans "on" %} {{ voucher.event.date_event }} {% trans "at" %} {{ voucher.event.place }}!</p> <p>{% trans "Voucher for" %} {{ voucher.person.first_name }} {{ voucher.person.last_name }} {% trans "to visit event" %} {{ voucher.event }} {% trans "on" %} {{ voucher.event.date_event }} {% trans "at" %} {{ voucher.event.place }}!</p>
<p>{% trans "To use the voucher, register for the event " %} <a href="{% url 'register_event_by_id' voucher.event.id %}">{% trans "here" %}</a></p> <p>{% trans "To use the voucher, register for the event " %} <a href="{% url 'register_event_by_pk' voucher.event.pk %}">{% trans "here" %}</a></p>
</div> </div>
{% endblock %} {% endblock %}
{% extends "core/base.html" %}
{% load material_form i18n any_js %}
{% block page_title %}{% blocktrans %}Create voucher{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Create voucher{% endblocktrans %}{% endblock %}
{% block extra_head %}
{{ form.media.css }}
{% include_css "select2-materialize" %}
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
{% form form=form %}{% endform %}
{% include "core/partials/save_button.html" %}
</form>
{{ form.media.js }}
{% include_js "select2-materialize" %}
{% endblock %}
{% extends "core/base.html" %} {% extends "core/base.html" %}
{% load material_form i18n %} {% load material_form i18n any_js %}
{% block page_title %}{% blocktrans %}Edit voucher{% endblocktrans %}{% endblock %} {% block page_title %}{% blocktrans %}Edit voucher{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Edit voucher{% endblocktrans %}{% endblock %} {% block browser_title %}{% blocktrans %}Edit voucher{% endblocktrans %}{% endblock %}
{% block extra_head %}
{{ form.media.css }}
{% include_css "select2-materialize" %}
{% endblock %}
{% block content %} {% block content %}
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
{% form form=edit_voucher_form %}{% endform %} {% form form=form %}{% endform %}
{% include "core/partials/save_button.html" %} {% include "core/partials/save_button.html" %}
</form> </form>
{{ form.media.js }}
{% include_js "select2-materialize" %}
{% endblock %} {% endblock %}
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* {% trans "Event" %}: {{ registration.event }} * {% trans "Event" %}: {{ registration.event }}
**** {% trans "Person " %} **** **** {% trans "Person" %} ****
* {% trans "Name" %}: {{ registration.person }} * {% trans "Name" %}: {{ registration.person }}
* {% trans "Date of birth" %}: {{ registration.date_of_birth }} * {% trans "Date of birth" %}: {{ registration.date_of_birth }}
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<ul> <ul>
<li>{% trans "Event" %}: {{ registration.event }}</li> <li>{% trans "Event" %}: {{ registration.event }}</li>
</ul> </ul>
<h5>{% trans "Person " %</h5> <h5>{% trans "Person" %}</h5>
<ul> <ul>
<li>{% trans "Name" %}: {{ registration.person }}</li> <li>{% trans "Name" %}: {{ registration.person }}</li>
<li>{% trans "Date of birth" %}: {{ registration.date_of_birth }}</li> <li>{% trans "Date of birth" %}: {{ registration.date_of_birth }}</li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment