Introduce RequiredAction model

Fix #343 by no longer marking as refunded automatically
This commit is contained in:
Raphael Michel
2017-01-04 15:04:18 +01:00
parent 871011826c
commit aed9382fd7
16 changed files with 303 additions and 11 deletions

View File

@@ -0,0 +1,25 @@
{% extends "pretixcontrol/items/base.html" %}
{% load i18n %}
{% block title %}{% trans "Current issues" %}{% endblock %}
{% block inside %}
<h1>{% trans "Current issues" %}</h1>
<ul class="list-group">
{% for action in actions %}
<li class="list-group-item logentry">
<p>
<a href="{% url "control:event.requiredaction.discard" event=request.event.slug organizer=request.event.organizer.slug id=action.id %}"
class="btn btn-default btn-xs pull-right">
{% trans "Hide message" %}
</a>
<small><span class="fa fa-clock-o"></span> {{ action.datetime|date:"SHORT_DATETIME_FORMAT" }}</small>
</p>
{{ action.display|safe }}
</li>
{% empty %}
<div class="list-group-item">
<em>{% trans "No issues. Awesome!" %}</em>
</div>
{% endfor %}
</ul>
{% include "pretixcontrol/pagination.html" %}
{% endblock %}

View File

@@ -9,6 +9,36 @@
{% trans "Go to shop" %}
</a>
</h1>
{% if actions|length > 0 %}
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title">
{% trans "Your attention is required to resolve the following issues" %}
</h3>
</div>
<ul class="list-group">
{% for action in actions %}
<li class="list-group-item logentry">
<p>
<a href="{% url "control:event.requiredaction.discard" event=request.event.slug organizer=request.event.organizer.slug id=action.id %}"
class="btn btn-default btn-xs pull-right">
{% trans "Hide message" %}
</a>
<small><span class="fa fa-clock-o"></span> {{ action.datetime|date:"SHORT_DATETIME_FORMAT" }}</small>
</p>
{{ action.display|safe }}
</li>
{% endfor %}
</ul>
<div class="panel-footer">
<a href="{% url "control:event.requiredactions" event=request.event.slug organizer=request.event.organizer.slug %}">
{% trans "Show more" %}
</a>
</div>
</div>
{% endif %}
<div class="row dashboard">
{% for w in widgets %}
<div class="widget-container widget-{{ w.display_size|default:"small" }}">