mirror of
https://github.com/pretix/pretix.git
synced 2026-05-16 17:03:58 +00:00
use list-group for backend UI
This commit is contained in:
@@ -5,17 +5,27 @@
|
|||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<h3 class="panel-title">
|
<h3 class="panel-title">
|
||||||
{% trans "Data Sync" %}
|
{% trans "Data transfer to external systems" %}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<ul class="list-group">
|
||||||
<table class="table table-condensed">
|
{% for identifier, display_name, pending, objects in providers %}
|
||||||
<tbody>
|
<li class="list-group-item">
|
||||||
{% for identifier, display_name, pending, objects in providers %}
|
<form action="{% url "control:event.order.sync_job" organizer=event.organizer.slug event=event.slug code=order.code provider=identifier %}" method="post" class="form-inline pull-right">
|
||||||
<tr>
|
{% csrf_token %}
|
||||||
<td>{{ display_name }}</td>
|
|
||||||
<td>
|
|
||||||
{% if pending %}
|
{% if pending %}
|
||||||
|
{% if pending.not_before %}
|
||||||
|
<button type="submit" name="run_job_now" value="{{ pending.pk }}" class="btn btn-default"><i class="fa fa-refresh"></i> {% trans "Retry now" %}</button>
|
||||||
|
{% endif %}
|
||||||
|
<button type="submit" name="cancel_job" value="{{ pending.pk }}" class="btn btn-danger"><i class="fa fa-times"></i> {% trans "Cancel" %}</button>
|
||||||
|
{% else %}
|
||||||
|
<button type="submit" class="btn btn-default"><i class="fa fa-refresh"></i> {% trans "Sync now" %}</button>
|
||||||
|
<input type="hidden" name="queue_sync" value="true">
|
||||||
|
{% endif %}
|
||||||
|
</form>
|
||||||
|
<p><b>{{ display_name }}</b></p>
|
||||||
|
{% if pending %}
|
||||||
|
<p>
|
||||||
{% if pending.failed_attempts %}
|
{% if pending.failed_attempts %}
|
||||||
<i class="fa fa-warning"></i>
|
<i class="fa fa-warning"></i>
|
||||||
{% blocktrans trimmed with num=pending.failed_attempts max=pending.max_retry_attempts %}
|
{% blocktrans trimmed with num=pending.failed_attempts max=pending.max_retry_attempts %}
|
||||||
@@ -32,41 +42,25 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<i class="fa fa-hourglass"></i> {% trans "Pending" %}
|
<i class="fa fa-hourglass"></i> {% trans "Pending" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
(triggered by {{ pending.triggered_by }} at {{ pending.triggered|date:"SHORT_DATETIME_FORMAT" }})
|
<span class="text-muted">(triggered by {{ pending.triggered_by }} at {{ pending.triggered|date:"SHORT_DATETIME_FORMAT" }})</span>
|
||||||
{% else %}
|
</p>
|
||||||
-
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
</td>
|
<ul>
|
||||||
<td align="right">
|
{% for obj in objects %}
|
||||||
<form action="{% url "control:event.order.sync_job" organizer=event.organizer.slug event=event.slug code=order.code provider=identifier %}" method="post" class="form-inline">
|
<li>
|
||||||
{% csrf_token %}
|
|
||||||
{% if pending %}
|
|
||||||
{% if pending.not_before %}
|
|
||||||
<button type="submit" name="run_job_now" value="{{ pending.pk }}" class="btn btn-default"><i class="fa fa-refresh"></i> {% trans "Retry now" %}</button>
|
|
||||||
{% endif %}
|
|
||||||
<button type="submit" name="cancel_job" value="{{ pending.pk }}" class="btn btn-danger"><i class="fa fa-trash"></i> {% trans "Cancel" %}</button>
|
|
||||||
{% else %}
|
|
||||||
<button type="submit" class="btn btn-default"><i class="fa fa-refresh"></i> {% trans "Sync now" %}</button>
|
|
||||||
<input type="hidden" name="queue_sync" value="true">
|
|
||||||
{% endif %}
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% for obj in objects %}
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td>
|
|
||||||
{% if obj.external_link_html %}
|
{% if obj.external_link_html %}
|
||||||
{{ obj.external_link_html }}
|
{{ obj.external_link_html }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ obj.external_object_type }} with {{ obj.external_pk_name }} = {{ obj.external_pk_value }}
|
{{ obj.external_object_type }}
|
||||||
|
{% trans "identified by" %} {{ obj.external_pk_name }}
|
||||||
|
<em>{{ obj.external_pk_value }}</em>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
<time class="text-muted" datetime="{{ obj.timestamp.isoformat }}">{{ obj.timestamp }}</time>
|
||||||
<td align="right">{{ obj.timestamp }}</td>
|
</li>
|
||||||
</tr>
|
{% endfor %}
|
||||||
{% endfor %}
|
</ul>
|
||||||
{% endfor %}
|
</li>
|
||||||
</tbody>
|
{% endfor %}
|
||||||
</table>
|
</ul>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user