Added restore from trash feature
All checks were successful
buildbot/tox Build done.

This commit is contained in:
2020-12-03 15:50:47 +01:00
parent 94595f4785
commit 7624c3d69b
3 changed files with 92 additions and 33 deletions

View File

@@ -344,13 +344,16 @@ Wichtig: das System verschickt keine Bestätigung an dich oder den neuen Teilneh
{% with position=participant.position %}
<div class="panel {% if event.max_participants and position > event.max_participants %}panel-warning{% else %}panel-default{% endif %}">
<div id="headingParticipant_{{ participant.id }}" class="panel-heading" role="tab">
<h5 class="panel-title">
<a role="button" href="#collapseParticipant_{{ participant.id }}"
data-toggle="collapse"
aria-expanded="true" aria-controls="collapseParticipant_{{ participant.id }}">
<span class="caret"></span>&nbsp;&nbsp;
{{ position }}. {{ participant.get_full_name }}
</a>
<div>
<strong><span class="panel-title">
<a role="button" href="#collapseParticipant_{{ participant.id }}"
data-toggle="collapse"
aria-expanded="true" aria-controls="collapseParticipant_{{ participant.id }}">
<span class="caret"></span>&nbsp;&nbsp;
{{ position }}. {{ participant.get_full_name }}
</a>
</span></strong>
&nbsp;
<small>
(<a href="mailto:{{ participant.email_address }}">{{ participant.email_address }}</a>, {{ participant.phone_number }})
</small>
@@ -412,7 +415,7 @@ Wichtig: das System verschickt keine Bestätigung an dich oder den neuen Teilneh
{% endif %}
</form>
</div>
</h5>
</div>
</div>
<div id="collapseParticipant_{{ participant.id }}"
class="panel-collapse collapse {% if form.errors %}in{% endif %}"
@@ -459,7 +462,7 @@ Wichtig: das System verschickt keine Bestätigung an dich oder den neuen Teilneh
<hr />
<div class="pull-right text-info" style="margin-right: 1em;"
title="Wenn du Anmeldungen mit einem Klick auf das Plus- oder Minus-Symbol 'bearbeitest', oder Teilnehmer aus der Teilnehmerliste entfernst, dann kann man diese Einträge noch im Papierkorb sehen (herausholen kann sie im Moment aber nur heinzel).
title="Wenn du Anmeldungen mit einem Klick auf das Plus- oder Minus-Symbol 'bearbeitest', oder Teilnehmer aus der Teilnehmerliste entfernst, dann sind diese Einträge danach noch im Papierkorb zu finden.
">
{% bootstrap_icon 'question-sign' %}
</div>
@@ -486,12 +489,18 @@ Wichtig: das System verschickt keine Bestätigung an dich oder den neuen Teilneh
{% for registration in registrations_answered %}
<div>
<button disabled="disabled"
class="btn btn-link no-padding" title="Anmeldung wurde bereits bearbeitet">
class="btn btn-link no-padding" title="Bei dieser Anmeldung hast du bereits
am {{ registration.status.updated_at|date:'d. F Y, G:i' }}
auf {% if registration.status.accepted %}Plus{% else %}Minus{% endif %} geklickt.
">
<span class="{% if registration.status.accepted %}text-success{% else %}text-muted{% endif %}">{% bootstrap_icon 'plus-sign' %}</span>
</button>
&nbsp;
<button disabled="disabled"
class="btn btn-link no-padding" title="Anmeldung wurde bereits bearbeitet">
class="btn btn-link no-padding" title="Bei dieser Anmeldung hast du bereits
am {{ registration.status.updated_at|date:'d. F Y, G:i' }}
auf {% if registration.status.accepted %}Plus{% else %}Minus{% endif %} geklickt.
">
<span class="{% if not registration.status.accepted %}text-danger{% else %}text-muted{% endif %}">{% bootstrap_icon 'minus-sign' %}</span>
</button>
&nbsp;
@@ -509,13 +518,20 @@ Wichtig: das System verschickt keine Bestätigung an dich oder den neuen Teilneh
{% bootstrap_icon 'info-sign' %}
</span>
</span>
&nbsp;
<span class="text-info" title="Bei dieser Anmeldung hast du bereits
am {{ registration.status.updated_at|date:'d. F Y, G:i' }}
auf {% if registration.status.accepted %}Plus{% else %}Minus{% endif %} geklickt.
">
{% bootstrap_icon 'question-sign' %}
</span>
{% if has_permission_update_registration %}
<div class="pull-right">
<form action="" method="post" class="form-inline">
{% csrf_token %}
<input type="hidden" name="registration" value="{{ registration.id }}">
<button type="submit" name="action" value="untrash_registration"
class="btn btn-link no-padding"
title="{% trans 'Eintrag in Anmeldungen zurückholen' %}">
<span class="text-danger">{% bootstrap_icon 'repeat' %}</span>
</button>
</form>
</div>
{% endif %}
</div>
{% endfor %}
</div>
@@ -541,6 +557,14 @@ auf {% if registration.status.accepted %}Plus{% else %}Minus{% endif %} geklickt
<div class="panel-body">
{% for participant in participants_trash %}
<div>
<button disabled="disabled"
class="btn btn-link no-padding" title="Diesen Teilnehmer hast du
am {{ participant.trashed_at|date:'d. F Y, G:i' }}
von Position {{ participant.position }} der Teilnehmerliste entfernt.
">
<span class="text-danger">{% bootstrap_icon 'trash' %}</span>
</button>
&nbsp;
<span class="text-muted">
{{ participant.get_full_name }}
(<a href="mailto:{{ participant.email_address }}">{{ participant.email_address }}</a>,
@@ -562,13 +586,20 @@ auf {% if registration.status.accepted %}Plus{% else %}Minus{% endif %} geklickt
</span>
{% endif %}
</span>
&nbsp;
<span class="text-info" title="Diesen Teilnehmer hast du
am {{ participant.trashed_at|date:'d. F Y, G:i' }}
von Position {{ participant.position }} der Teilnehmerliste entfernt.
">
{% bootstrap_icon 'question-sign' %}
</span>
{% if has_permission_update_participants %}
<div class="pull-right">
<form action="" method="post" class="form-inline">
{% csrf_token %}
<input type="hidden" name="id" value="{{ participant.id }}">
<button name="action" value="untrash_participant"
title="{% trans 'Eintrag in Teilnehmerliste zurückholen' %}"
class="btn btn-link no-padding">
<span class="text-danger">{% bootstrap_icon 'repeat' %}</span>
</button>
</form>
</div>
{% endif %}
</div>
{% endfor %}
</div>