Merge branch 'main' into docs
commit
ee84866da0
@ -0,0 +1,9 @@
|
|||||||
|
from django import template
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
register = template.Library()
|
||||||
|
|
||||||
|
# settings value
|
||||||
|
@register.simple_tag
|
||||||
|
def settings_value(name):
|
||||||
|
return getattr(settings, name, "")
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-12-02 00:22
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('finance', '0003_alter_bill_options_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='bill',
|
||||||
|
name='amount',
|
||||||
|
field=models.DecimalField(decimal_places=2, default=0, max_digits=6, verbose_name='Amount'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-12-01 15:54
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('members', '0029_alter_member_gender_alter_memberwaitinglist_gender'),
|
||||||
|
('mailer', '0005_alter_emailaddress_name'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='emailaddress',
|
||||||
|
name='allowed_senders',
|
||||||
|
field=models.ManyToManyField(blank=True, help_text='Only forward e-mails of members of selected groups. Leave empty to allow all senders.', related_name='allowed_sender_on_emailaddresses', to='members.Group', verbose_name='Allowed sender'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-12-01 17:45
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mailer', '0006_emailaddress_allowed_senders'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='emailaddress',
|
||||||
|
name='internal_only',
|
||||||
|
field=models.BooleanField(default=False, help_text='Only allow forwarding to this e-mail address from the internal domain.', verbose_name='Restrict to internal email addresses'),
|
||||||
|
),
|
||||||
|
]
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-11-24 19:08
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('members', '0025_alter_member_options'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='emergencycontact',
|
||||||
|
name='email',
|
||||||
|
field=models.EmailField(blank=True, default='', max_length=100),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-11-27 22:16
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('members', '0026_alter_emergencycontact_email'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='group',
|
||||||
|
name='weekday',
|
||||||
|
field=models.IntegerField(blank=True, choices=[(0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5, 'Saturday'), (6, 'Sunday')], null=True, verbose_name='week day'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-11-27 22:40
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('mailer', '0005_alter_emailaddress_name'),
|
||||||
|
('members', '0027_alter_group_weekday'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='group',
|
||||||
|
name='contact_email',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='mailer.emailaddress', verbose_name='Contact email'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-11-28 00:16
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('members', '0028_group_contact_email'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='member',
|
||||||
|
name='gender',
|
||||||
|
field=models.IntegerField(choices=[(0, 'Männlich'), (1, 'Weiblich'), (2, 'Divers')], verbose_name='Gender'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='memberwaitinglist',
|
||||||
|
name='gender',
|
||||||
|
field=models.IntegerField(choices=[(0, 'Männlich'), (1, 'Weiblich'), (2, 'Divers')], verbose_name='Gender'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
# Generated by Django 4.0.1 on 2024-12-02 00:22
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('members', '0029_alter_member_gender_alter_memberwaitinglist_gender'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterModelOptions(
|
||||||
|
name='member',
|
||||||
|
options={'default_permissions': ('add_global', 'change_global', 'view_global', 'delete_global', 'list_global', 'view'), 'permissions': (('may_see_qualities', 'Is allowed to see the quality overview'), ('may_set_auth_user', 'Is allowed to set auth user member connections.'), ('may_change_member_group', 'Can change the group field'), ('may_invite_as_user', 'Is allowed to invite a member to set login data.'), ('may_change_organizationals', 'Is allowed to set organizational settings on members.')), 'verbose_name': 'member', 'verbose_name_plural': 'members'},
|
||||||
|
),
|
||||||
|
]
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
{% extends "admin/base_site.html" %}
|
||||||
|
{% load i18n admin_urls static %}
|
||||||
|
|
||||||
|
{% block extrahead %}
|
||||||
|
{{ block.super }}
|
||||||
|
{{ media }}
|
||||||
|
<script src="{% static 'admin/js/cancel.js' %}" async></script>
|
||||||
|
<script type="text/javascript" src="{% static "admin/js/vendor/jquery/jquery.js" %}"></script>
|
||||||
|
<script type="text/javascript" src="{% static "admin/js/jquery.init.js" %}"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} invite-waiter
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||||
|
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
|
||||||
|
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
|
||||||
|
› {% translate 'Demote to waiter' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h2>{% translate "Demote to waiter" %}</h2>
|
||||||
|
<p>
|
||||||
|
{% trans "Do you want to demote the following unconfirmed registrations to waiters?" %}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
{% for member in queryset %}
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'admin:members_memberunconfirmedproxy_change' 3 %}">{{ member }}</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form action="" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
{% if form %}
|
||||||
|
{{form}}
|
||||||
|
{% endif %}
|
||||||
|
<input type="hidden" name="action" value="demote_to_waiter_action">
|
||||||
|
<input class="default" style="color: $default-link-color" type="submit" name="apply" value="{% translate 'Demote' %}">
|
||||||
|
<a href="#" class="button cancel-link">{% translate "Cancel" %}</a>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
||||||
@ -0,0 +1,167 @@
|
|||||||
|
{% extends "admin/base_site.html" %}
|
||||||
|
{% load i18n admin_urls static %}
|
||||||
|
|
||||||
|
{% block extrahead %}
|
||||||
|
{{ block.super }}
|
||||||
|
{{ media }}
|
||||||
|
<script src="{% static 'admin/js/cancel.js' %}" async></script>
|
||||||
|
<script type="text/javascript" src="{% static "admin/js/vendor/jquery/jquery.js" %}"></script>
|
||||||
|
<script type="text/javascript" src="{% static "admin/js/jquery.init.js" %}"></script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} invite-waiter
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block breadcrumbs %}
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
|
||||||
|
› <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
|
||||||
|
› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
|
||||||
|
› <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a>
|
||||||
|
› {% translate 'Finance overview' %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h2>{% trans 'Excursion' %}: {{ memberlist.name }}</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}
|
||||||
|
Here you see an estimate on the expected costs and contributions by the association. This is not a guaranteed
|
||||||
|
cost plan!
|
||||||
|
{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
<h3>{% translate "Expenses" %}</h3>
|
||||||
|
{% blocktrans %}You listed the following expenses:{% endblocktrans %}
|
||||||
|
<p>
|
||||||
|
<table>
|
||||||
|
<th>
|
||||||
|
<td>{% trans "Explanation" %}</td>
|
||||||
|
<td>{% trans "Amount" %}</td>
|
||||||
|
</th>
|
||||||
|
{% for bill in memberlist.statement.bill_set.all %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{{bill.short_description}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{bill.explanation}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ bill.amount }}€
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>{% blocktrans %}The total expected expenses are {{ total_bills_theoretic }} €.{% endblocktrans %}</p>
|
||||||
|
|
||||||
|
<h3>{% trans "Contributions by the association" %}</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}According to the contribution guidelines,
|
||||||
|
{{ staff_count }} youth leader(s) receive contributions. Each of them receives{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
{% blocktrans %}{{ nights }} nights for {{ price_per_night }}€ per night making a total of {{ nights_per_yl }}€.{% endblocktrans %}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{% blocktrans %}{{ duration }} days for {{ allowance_per_day }}€ per day making a total of {{ allowance_per_yl }}€.{% endblocktrans %}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{% blocktrans %}{{ kilometers_traveled }} km by {{ means_of_transport }} ({{euro_per_km}} € / km) making a total of {{ transportation_per_yl }}€.{% endblocktrans %}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}In total these are contributions of {{ total_per_yl }}€ times {{ staff_count }}, giving {{ total_staff }}€.{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>{% trans "LJP contributions" %}</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}By submitting a seminar report, you may apply for LJP contributions. In this case,
|
||||||
|
you may obtain up to 25€ times {{ duration }} days for {{ participant_count }} participants but only up to
|
||||||
|
90% of the total costs. This results in a total of {{ ljp_contributions }}€.{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h3>{% trans "Summary" %}</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}This is the estimated cost and contribution summary:{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% trans "Expenses" %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ total_bills_theoretic }}€
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% trans "Contributions by the association" %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
-{{ total_staff }}€
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% trans "Potential LJP contributions" %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
-{{ ljp_contributions }}€
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{% trans "Remaining costs" %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ total_relative_costs }}€
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}Positive remaining costs indicate that the estimated costs exceed the estimated contributions, while negative
|
||||||
|
remaining costs indicate that the estimated contributions exceed the estimated costs.{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}Note that this cost calculation expects you to apply for LJP contributions. On the
|
||||||
|
excursions main page, you can generate a template for a seminar report.{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
{% if not memberlist.statement.submitted %}
|
||||||
|
<h3>{% trans "Submit statement" %}</h3>
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}Did you already complete this excursion? If yes, please check if all listed expenses are correct
|
||||||
|
and then submit the statement for processing by the finance department. If you proceed,
|
||||||
|
no further changes to the statement are possible.{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form action="" method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="action" value="finance_overview">
|
||||||
|
<input type="hidden" name="finance_overview">
|
||||||
|
<input class="default" style="color: $default-link-color" type="submit" name="apply" value="{% translate 'Submit' %}">
|
||||||
|
<a href="#" class="button cancel-link">{% translate "Cancel" %}</a>
|
||||||
|
</form>
|
||||||
|
{% else %}
|
||||||
|
<br>
|
||||||
|
<h3>{% trans "Statement submitted" %}</h3>
|
||||||
|
<p>
|
||||||
|
{% blocktrans %}The statement for this excursion was already submitted. The finance department is currently processing your
|
||||||
|
data and you will receive a response shortly.{% endblocktrans %}
|
||||||
|
</p>
|
||||||
|
<a href="#" class="button cancel-link">{% translate "Back" %}</a>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
Binary file not shown.
@ -0,0 +1,15 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
||||||
|
<link rel="stylesheet" href="/downtime/base.css">
|
||||||
|
<link rel="shortcut icon" type="image/png" href="/downtime/favicon.png"/>
|
||||||
|
<title>Wartungsarbeiten</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="main">
|
||||||
|
<h2>Wartungsarbeiten</h2>
|
||||||
|
<p>Unsere Webseite ist zur Zeit wegen Wartungsarbeiten leider nicht verfügbar. Bitte
|
||||||
|
versuche es zu einem späteren Zeitpunkt nochmal.</p>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
#main {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15pt;
|
||||||
|
width: 60%;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
padding-top: 40pt;
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@ -0,0 +1,38 @@
|
|||||||
|
{% load i18n admin_urls %}
|
||||||
|
<div class="js-inline-admin-formset inline-group"
|
||||||
|
id="{{ inline_admin_formset.formset.prefix }}-group"
|
||||||
|
data-inline-type="stacked"
|
||||||
|
data-inline-formset="{{ inline_admin_formset.inline_formset_data }}">
|
||||||
|
<fieldset class="module {{ inline_admin_formset.classes }}" aria-labelledby="{{ inline_admin_formset.formset.prefix }}-heading">
|
||||||
|
{% if inline_admin_formset.is_collapsible %}<details><summary>{% endif %}
|
||||||
|
<h2 id="{{ inline_admin_formset.formset.prefix }}-heading" class="inline-heading">
|
||||||
|
{% if inline_admin_formset.formset.max_num == 1 %}
|
||||||
|
{{ inline_admin_formset.opts.verbose_name|capfirst }}
|
||||||
|
{% else %}
|
||||||
|
{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}
|
||||||
|
{% endif %}
|
||||||
|
</h2>
|
||||||
|
{% if inline_admin_formset.is_collapsible %}</summary>{% endif %}
|
||||||
|
{{ inline_admin_formset.formset.management_form }}
|
||||||
|
{{ inline_admin_formset.formset.non_form_errors }}
|
||||||
|
|
||||||
|
{% for inline_admin_form in inline_admin_formset %}<div class="inline-related{% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form last-related{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% else %}{{ forloop.counter0 }}{% endif %}">
|
||||||
|
<h3><b>{{ inline_admin_formset.opts.verbose_name|capfirst }}:</b> <span class="inline_label">{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} <a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{{ inline_admin_formset.has_change_permission|yesno:'inlinechangelink,inlineviewlink' }}">{% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}</a>{% endif %}
|
||||||
|
{% else %}#{{ forloop.counter }}{% endif %}</span>
|
||||||
|
{% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>{% endif %}
|
||||||
|
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}
|
||||||
|
</h3>
|
||||||
|
{% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %}
|
||||||
|
|
||||||
|
{% with parent_counter=forloop.counter0 %}
|
||||||
|
{% for fieldset in inline_admin_form %}
|
||||||
|
{% include "admin/includes/fieldset.html" with heading_level=4 prefix=fieldset.formset.prefix id_prefix=parent_counter id_suffix=forloop.counter0 %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endwith %}
|
||||||
|
|
||||||
|
{% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
|
||||||
|
{% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}
|
||||||
|
</div>{% endfor %}
|
||||||
|
{% if inline_admin_formset.is_collapsible %}</details>{% endif %}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
{% load i18n admin_urls static admin_modify %}
|
||||||
|
<div class="js-inline-admin-formset inline-group" id="{{ inline_admin_formset.formset.prefix }}-group"
|
||||||
|
data-inline-type="tabular"
|
||||||
|
data-inline-formset="{{ inline_admin_formset.inline_formset_data }}">
|
||||||
|
<div class="tabular inline-related {% if forloop.last %}last-related{% endif %}">
|
||||||
|
{{ inline_admin_formset.formset.management_form }}
|
||||||
|
<fieldset class="module {{ inline_admin_formset.classes }}" aria-labelledby="{{ inline_admin_formset.formset.prefix }}-heading">
|
||||||
|
{% if inline_admin_formset.is_collapsible %}<details><summary>{% endif %}
|
||||||
|
<h2 id="{{ inline_admin_formset.formset.prefix }}-heading" class="inline-heading">
|
||||||
|
{% if inline_admin_formset.formset.max_num == 1 %}
|
||||||
|
{{ inline_admin_formset.opts.verbose_name|capfirst }}
|
||||||
|
{% else %}
|
||||||
|
{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}
|
||||||
|
{% endif %}
|
||||||
|
</h2>
|
||||||
|
{% if inline_admin_formset.is_collapsible %}</summary>{% endif %}
|
||||||
|
{{ inline_admin_formset.formset.non_form_errors }}
|
||||||
|
{% if inline_admin_formset.opts.description %}
|
||||||
|
<div class="description">
|
||||||
|
<p>
|
||||||
|
{{ inline_admin_formset.opts.description }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<table>
|
||||||
|
<thead><tr>
|
||||||
|
<th class="original"></th>
|
||||||
|
{% for field in inline_admin_formset.fields %}
|
||||||
|
<th class="column-{{ field.name }}{% if field.required %} required{% endif %}{% if field.widget.is_hidden %} hidden{% endif %}">{{ field.label|capfirst }}
|
||||||
|
{% if field.help_text %}<img src="{% static "admin/img/icon-unknown.svg" %}" class="help help-tooltip" width="10" height="10" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}">{% endif %}
|
||||||
|
</th>
|
||||||
|
{% endfor %}
|
||||||
|
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}<th>{% translate "Delete?" %}</th>{% endif %}
|
||||||
|
</tr></thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
{% for inline_admin_form in inline_admin_formset %}
|
||||||
|
{% if inline_admin_form.form.non_field_errors %}
|
||||||
|
<tr class="row-form-errors"><td colspan="{{ inline_admin_form|cell_count }}">{{ inline_admin_form.form.non_field_errors }}</td></tr>
|
||||||
|
{% endif %}
|
||||||
|
<tr class="form-row {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form{% endif %}"
|
||||||
|
id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% else %}{{ forloop.counter0 }}{% endif %}">
|
||||||
|
<td class="original">
|
||||||
|
{% if inline_admin_form.original or inline_admin_form.show_url %}<p>
|
||||||
|
{% if inline_admin_form.original %}
|
||||||
|
{{ inline_admin_form.original }}
|
||||||
|
{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}<a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{{ inline_admin_formset.has_change_permission|yesno:'inlinechangelink,inlineviewlink' }}">{% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}</a>{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>{% endif %}
|
||||||
|
</p>{% endif %}
|
||||||
|
{% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
|
||||||
|
{% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}
|
||||||
|
</td>
|
||||||
|
{% for fieldset in inline_admin_form %}
|
||||||
|
{% for line in fieldset %}
|
||||||
|
{% for field in line %}
|
||||||
|
<td class="{% if field.field.name %}field-{{ field.field.name }}{% endif %}{% if field.field.is_hidden %} hidden{% endif %}">
|
||||||
|
{% if field.is_readonly %}
|
||||||
|
<p>{{ field.contents }}</p>
|
||||||
|
{% else %}
|
||||||
|
{{ field.field.errors.as_ul }}
|
||||||
|
{{ field.field }}
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
|
||||||
|
<td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% if inline_admin_formset.is_collapsible %}</details>{% endif %}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
{% extends "admin/app_index.html" %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div id="content-main">
|
||||||
|
<div class="app-mailer module current-app">
|
||||||
|
<h2>E-Mail Verteiler</h2>
|
||||||
|
<p>
|
||||||
|
Hier kannst du E-Mails an deine Gruppe oder an andere Menschen in der JDAV Heidelberg schicken.
|
||||||
|
</p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<a href='{% url 'admin:mailer_message_add' %}'>Verfassen</a>
|
||||||
|
</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<a href='{% url 'admin:mailer_message_changelist' %}?sent__exact=1'>Gesendet</a>
|
||||||
|
</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<a href='{% url 'admin:mailer_message_changelist' %}?sent__exact=0'>Entwürfe</a>
|
||||||
|
</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% if perms.mailer.change_emailaddress %}
|
||||||
|
<br>
|
||||||
|
<div class="app-mailer module current-app">
|
||||||
|
<h2>Weiterleitungen</h2>
|
||||||
|
<p>
|
||||||
|
Hier kannst du E-Mail Adressen, also Weiterleitungen, konfigurieren.
|
||||||
|
</p>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">
|
||||||
|
<a href='{% url 'admin:mailer_emailaddress_changelist' %}'>E-Mail Adressen</a>
|
||||||
|
</th>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
{% extends "admin/change_form_object_tools.html" %}
|
||||||
|
{% load i18n admin_urls %}
|
||||||
|
|
||||||
|
{% block object-tools-items %}
|
||||||
|
|
||||||
|
<li>
|
||||||
|
{% url opts|admin_urlname:'demote' original.pk|admin_urlquote as demote_url %}
|
||||||
|
<a class="historylink" href="{% add_preserved_filters demote_url %}">{% trans 'Demote to waiter' %}</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{{block.super}}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
{% load i18n nested_admin admin_urls %}
|
||||||
|
{% with inline_admin_formset.formset.is_nested as is_nested %}
|
||||||
|
|
||||||
|
{% with inline_admin_formset.opts as inline_opts %}
|
||||||
|
<div class="inline-group group djn-group djn-stacked{% if is_nested %} djn-group-nested{% else %} djn-group-root{% endif %}"
|
||||||
|
id="{{ inline_admin_formset.formset.prefix }}-group"
|
||||||
|
data-inline-type="stacked"
|
||||||
|
data-inline-formset="{{ inline_admin_formset.inline_formset_data }}"
|
||||||
|
data-inline-model="{{ inline_admin_formset.inline_model_id }}">
|
||||||
|
|
||||||
|
{% ifinlineclasses %}<fieldset class="djn-fieldset module {{ inline_admin_formset.classes }}" aria-labelledby="{{ inline_admin_formset.formset.prefix }}-heading">{% endifinlineclasses %}
|
||||||
|
{% if inline_admin_formset.is_collapsible %}<details><summary>{% endif %}
|
||||||
|
<h2 id="{{ inline_admin_formset.formset.prefix }}-heading" class="inline-heading">
|
||||||
|
{% if inline_admin_formset.opts.title %}{{ inline_admin_formset.opts.title }}{% else %}{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}{% endif %}
|
||||||
|
</h2>
|
||||||
|
{% if inline_admin_formset.is_collapsible %}</summary>{% endif %}
|
||||||
|
|
||||||
|
{{ inline_admin_formset.formset.management_form }}
|
||||||
|
{{ inline_admin_formset.formset.non_form_errors }}
|
||||||
|
{% if inline_admin_formset.opts.description %}
|
||||||
|
<div class="description">
|
||||||
|
<p>
|
||||||
|
{{ inline_admin_formset.opts.description }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="items djn-items">
|
||||||
|
|
||||||
|
{% with inline_admin_formset.opts.sortable_field_name|default:"" as sortable_field_name %}
|
||||||
|
{% for inline_admin_form in inline_admin_formset|formsetsort:sortable_field_name %}
|
||||||
|
{% if forloop.first %}
|
||||||
|
<div class="djn-item djn-no-drag"><div></div></div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="{% if not forloop.last or not inline_admin_formset.has_add_permission %}djn-item{% endif %} djn-module djn-inline-form{% if inline_admin_form.original or inline_admin_form.show_url %} has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} djn-empty-form empty-form last-related{% endif %} inline-related"
|
||||||
|
data-inline-model="{{ inline_admin_form.model_admin.opts.app_label }}-{{ inline_admin_form.model_admin.opts.model_name }}"
|
||||||
|
{% if inline_admin_form.pk_field.field %}
|
||||||
|
data-is-initial="{% if inline_admin_form.pk_field.field.value %}true{% else %}false{% endif %}"
|
||||||
|
{% endif %}
|
||||||
|
id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% else %}{{ inline_admin_form.form|form_index }}{% endif %}">
|
||||||
|
|
||||||
|
<h3 class="{% if not inline_opts.sortable_options or not inline_opts.sortable_options.disabled %} djn-drag-handler{% endif %}">
|
||||||
|
<b>{{ inline_admin_formset.opts.verbose_name|capfirst }}:</b> <span class="inline_label">{% if inline_admin_form.original %}{{ inline_admin_form.original }}{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %} <a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{% if inline_admin_formset.has_change_permission %}inlinechangelink{% else %}inlineviewlink{% endif %}">{% if inline_admin_formset.has_change_permission %}{% trans "Change" %}{% else %}{% trans "View" %}{% endif %}</a>{% endif %}
|
||||||
|
{% else %}#{{ forloop.counter }}{% endif %}</span>
|
||||||
|
{% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% trans "View on site" %}</a>{% endif %}
|
||||||
|
{% if inline_admin_formset.formset.can_delete %}
|
||||||
|
{% if inline_admin_form.original %}
|
||||||
|
<span class="delete djn-delete-handler {{ inline_admin_formset.handler_classes|join:" " }}">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>
|
||||||
|
{% else %}
|
||||||
|
<span><a class="inline-deletelink djn-remove-handler {{ inline_admin_formset.handler_classes|join:" " }}" href="javascript:void(0)">Remove</a></span>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
{% if inline_admin_form.form.non_field_errors %}
|
||||||
|
<ul class="errorlist">
|
||||||
|
<li>{{ inline_admin_form.form.non_field_errors }}</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if "5.1"|django_version_gte %}
|
||||||
|
{% with parent_counter=forloop.counter0 %}
|
||||||
|
{% for fieldset in inline_admin_form %}
|
||||||
|
{% include inline_admin_formset.opts.fieldset_template with heading_level=4 id_prefix=parent_counter id_suffix=forloop.counter0 %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endwith %}
|
||||||
|
{% else %}
|
||||||
|
{% for fieldset in inline_admin_form %}
|
||||||
|
{% include inline_admin_formset.opts.fieldset_template %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if inline_admin_form.has_auto_field or inline_admin_form.needs_explicit_pk_field %}
|
||||||
|
{{ inline_admin_form.pk_field.field }}
|
||||||
|
{% endif %}
|
||||||
|
{% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}
|
||||||
|
{% if inline_admin_form.form.inlines %}
|
||||||
|
{% for nested in inline_admin_form.form.inlines %}
|
||||||
|
{% include nested.opts.template with inline_admin_formset=nested %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
<div class="djn-module djn-add-item add-item add-row">
|
||||||
|
<a href="javascript://" class="add-handler djn-add-handler {{ inline_admin_formset.handler_classes|join:" " }}">
|
||||||
|
{% blocktrans with inline_admin_formset.opts.verbose_name|strip_parent_name:inline_opts.verbose_name|title as verbose_name %}Add another {{ verbose_name }}{% endblocktrans %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% if inline_admin_formset.is_collapsible %}</details>{% endif %}
|
||||||
|
{% ifinlineclasses %}</fieldset>{% endifinlineclasses %}
|
||||||
|
</div>
|
||||||
|
{% endwith %}{# ends with inline_admin_formset.opts as inline_opts #}
|
||||||
|
|
||||||
|
{% endwith %}{# ends {% with inline_admin_formset.formset.is_nested as is_nested %} #}
|
||||||
Loading…
Reference in New Issue