Add notification settings and forms for email notifications
This commit is contained in:
parent
93f5f05a33
commit
bb8949af76
19 changed files with 435 additions and 23 deletions
50
app/bird/templates/bird/bird_species_edit.html
Normal file
50
app/bird/templates/bird/bird_species_edit.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block content %}
|
||||
|
||||
<h3>E-Mail-Benachrichtigungen für {{ bird_species.name }} bearbeiten</h3>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 mb-3">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
<a href="{% url 'bird_species_list' %}" class="btn btn-success">Abbrechen</a>
|
||||
<button class="btn btn-primary" type="submit">Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5>Informationen zu E-Mail-Benachrichtigungen</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h6>Naturschutzbehörde</h6>
|
||||
<p class="small">
|
||||
Wenn aktiviert, wird automatisch eine E-Mail an alle als "Naturschutzbehörde"
|
||||
markierten E-Mail-Adressen gesendet, wenn ein Vogel dieser Art gefunden wird.
|
||||
</p>
|
||||
|
||||
<h6>Jagdbehörde</h6>
|
||||
<p class="small">
|
||||
Wenn aktiviert, wird automatisch eine E-Mail an alle als "Jagdbehörde"
|
||||
markierten E-Mail-Adressen gesendet, wenn ein Vogel dieser Art gefunden wird.
|
||||
</p>
|
||||
|
||||
<h6>Wildvogelhilfe-Team</h6>
|
||||
<p class="small">
|
||||
Wenn aktiviert, wird automatisch eine E-Mail an alle als "Wildvogelhilfe-Team"
|
||||
markierten E-Mail-Adressen gesendet, wenn ein Vogel dieser Art gefunden wird.
|
||||
</p>
|
||||
|
||||
<div class="alert alert-info mt-3">
|
||||
<strong>Hinweis:</strong> Für neue Vogelarten werden standardmäßig
|
||||
"Naturschutzbehörde" und "Wildvogelhilfe-Team" aktiviert.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
58
app/bird/templates/bird/bird_species_list.html
Normal file
58
app/bird/templates/bird/bird_species_list.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
|
||||
<h3>Vogelarten - E-Mail-Benachrichtigungen verwalten</h3>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 mb-3">
|
||||
<p>
|
||||
Hier können Sie für jede Vogelart konfigurieren, welche Behörden und Teams
|
||||
automatisch benachrichtigt werden sollen, wenn ein Vogel dieser Art gefunden wird.
|
||||
</p>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vogelart</th>
|
||||
<th>Naturschutzbehörde</th>
|
||||
<th>Jagdbehörde</th>
|
||||
<th>Wildvogelhilfe-Team</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for bird in birds %}
|
||||
<tr>
|
||||
<td><strong>{{ bird.name }}</strong></td>
|
||||
<td>
|
||||
{% if bird.melden_an_naturschutzbehoerde %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">Inaktiv</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if bird.melden_an_jagdbehoerde %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">Inaktiv</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if bird.melden_an_wildvogelhilfe_team %}
|
||||
<span class="badge bg-success">Aktiv</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">Inaktiv</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'bird_species_edit' bird.id %}" class="btn btn-sm btn-primary">Bearbeiten</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock content %}
|
Loading…
Add table
Add a link
Reference in a new issue