category_type refactoring

This commit is contained in:
Mira Weller
2024-06-21 18:03:01 +02:00
parent 01b535a0af
commit d04b855cce
3 changed files with 18 additions and 19 deletions

View File

@@ -42,11 +42,7 @@
<strong><a href="{% url "control:event.items.categories.edit" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}">{{ c.internal_name|default:c.name }}</a></strong>
</td>
<td>
{% if c.is_addon %}{% trans "Add-on product category" %}
{% elif c.cross_selling_mode is None %}{% trans "Normal category" %}
{% elif c.cross_selling_mode == 'both' %}{% trans "Combined category" %}
{% elif c.cross_selling_mode == 'only' %}{% trans "Cross-selling category" %}
{% endif %}
{{ c.get_category_type_display }}
</td>
<td class="text-right flip">
<button title="{% trans "Move up" %}" formaction="{% url "control:event.items.categories.up" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm sortable-up"{% if forloop.counter0 == 0 and not page_obj.has_previous %} disabled{% endif %}><i class="fa fa-arrow-up"></i></button>