add event organizer merge tool
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
{% extends "wagtailadmin/generic/base.html" %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% block main_content %}
|
||||
<table class="listing">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Outcome" %}</th>
|
||||
<th>{% trans "ID" %}</th>
|
||||
<th>{% trans "Name" %}</th>
|
||||
<th>{% trans "Slug" %}</th>
|
||||
<th>{% trans "Association" %}</th>
|
||||
<th>{% trans "External URL" %}</th>
|
||||
<th>{% trans "Events" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>{% trans "Survives" %}</strong></td>
|
||||
<td>{{ survivor.pk }}</td>
|
||||
<td>{{ survivor.name }}</td>
|
||||
<td>{{ survivor.slug }}</td>
|
||||
<td>{{ survivor.association|default:"—" }}</td>
|
||||
<td>{{ survivor.external_url|default:"—" }}</td>
|
||||
<td>{{ survivor_event_count }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>{% trans "Is deleted" %}</strong></td>
|
||||
<td>{{ loser.pk }}</td>
|
||||
<td>{{ loser.name }}</td>
|
||||
<td>{{ loser.slug }}</td>
|
||||
<td>{{ loser.association|default:"—" }}</td>
|
||||
<td>{{ loser.external_url|default:"—" }}</td>
|
||||
<td>{{ loser_event_count }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="help-block help-warning">
|
||||
{% blocktrans with loser_name=loser.name survivor_name=survivor.name trimmed %}
|
||||
Events organized by “{{ loser_name }}” will be moved to “{{ survivor_name }}”,
|
||||
and “{{ loser_name }}” will be deleted. This cannot be undone.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
|
||||
<form method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
<ul class="fields">
|
||||
{% for field in form.visible_fields %}
|
||||
<li>{% formattedfield field %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button type="submit" class="button serious">{% trans "Merge organizers" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,30 @@
|
||||
{% extends "wagtailadmin/generic/base.html" %}
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
{% block main_content %}
|
||||
<p>
|
||||
{% trans "Pick the two organizers to merge. The one with the lowest ID survives; the other one is deleted after its events have been moved over." %}
|
||||
</p>
|
||||
<form method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
{% if form.non_field_errors %}
|
||||
<div class="help-block help-critical">{{ form.non_field_errors }}</div>
|
||||
{% endif %}
|
||||
<ul class="fields">
|
||||
{% for field in form.visible_fields %}
|
||||
<li>{% formattedfield field %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<button type="submit" class="button">{% trans "Continue" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{{ block.super }}
|
||||
{{ form.media.js }}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{{ block.super }}
|
||||
{{ form.media.css }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user