Files
pretix_cgo/src/pretix/control/templates/pretixcontrol/item/base.html
T
MiraandGitHub 826bd07b01 Add action buttons to "missing quota" warnings (#4533)
* Add action buttons to "missing quota" warnings

* Update item.py
2024-10-28 12:25:03 +01:00

59 lines
2.9 KiB
HTML

{% extends "pretixcontrol/event/base.html" %}
{% load i18n %}
{% block title %}{{ object }} :: {% trans "Product" %}{% endblock %}
{% block content %}
{% if object.id %}
<h1>{% trans "Modify product:" %} {{ object }}</h1>
{% else %}
<h1>{% trans "Create product" %}</h1>
<p>{% blocktrans trimmed %}
You will be able to adjust further settings in the next step.
{% endblocktrans %}</p>
{% endif %}
{% if object.id and not object.quotas.exists %}
<div class="alert alert-warning">
<div class="row">
<div class="col-lg-8">
{% blocktrans trimmed %}
Please note that your product will <strong>not</strong> be available for sale until you have added your
item to an existing or newly created quota.
{% endblocktrans %}
</div>
<div class="col-lg-4 text-right">
<a class="btn btn-default btn-sm" href="{% url "control:event.items.quotas" organizer=request.event.organizer.slug event=request.event.slug %}">
<i class="fa fa-wrench"></i> {% trans "Manage quotas" %}
</a>
<a class="btn btn-default btn-sm" href="{% url "control:event.items.quotas.add" organizer=request.event.organizer.slug event=request.event.slug %}?{% if object.has_variations %}{% for var in object.variations.all %}product={{ object.pk }}-{{ var.pk }}&{% endfor %}{% else %}product={{ object.pk }}{% endif %}">
<i class="fa fa-plus"></i> {% trans "Create a new quota" %}
</a>
</div>
</div>
</div>
{% elif object.pk and not object.is_available_by_time %}
<div class="alert alert-warning">
{% blocktrans trimmed %}
This product is currently not being sold since you configured below that it should only be available in a certain timeframe.
{% endblocktrans %}
</div>
{% endif %}
{% if object.hidden_if_available and object.hidden_if_available.availability.0 == 100 %}
<div class="alert alert-warning">
{% blocktrans trimmed %}
This product is currently not being shown since you configured below that it should only be visible
if a certain other quota is already sold out.
{% endblocktrans %}
</div>
{% endif %}
{% if not request.event.has_subevents and object.hidden_if_item_available and object.hidden_if_item_available.check_quotas.0 == 100 %}
<div class="alert alert-warning">
{% blocktrans trimmed %}
This product is currently not being shown since you configured below that it should only be visible
if a certain other product is already sold out.
{% endblocktrans %}
</div>
{% endif %}
{% block inside %}
{% endblock %}
{% endblock %}