forked from CGM_Public/pretix_original
Item list: Add more icons
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Product name" %}</th>
|
<th>{% trans "Product name" %}</th>
|
||||||
<th class="iconcol"></th>
|
<th></th>
|
||||||
<th class="iconcol"></th>
|
<th class="iconcol"></th>
|
||||||
<th class="iconcol"></th>
|
<th class="iconcol"></th>
|
||||||
<th class="iconcol"></th>
|
<th class="iconcol"></th>
|
||||||
@@ -51,7 +51,17 @@
|
|||||||
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}">{{ i }}</a>
|
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}">{{ i }}</a>
|
||||||
{% if not i.active %}</strike>{% endif %}
|
{% if not i.active %}</strike>{% endif %}
|
||||||
</strong>
|
</strong>
|
||||||
<br><small class="text-muted">#{{ i.pk }}</small>
|
<br>
|
||||||
|
<small class="text-muted">
|
||||||
|
#{{ i.pk }}
|
||||||
|
{% for k, c in sales_channels.items %}
|
||||||
|
{% if k in i.sales_channels %}
|
||||||
|
<span class="fa fa-fw fa-{{ c.icon }} text-muted"
|
||||||
|
data-toggle="tooltip" title="{% trans c.verbose_name %}"></span>
|
||||||
|
{% else %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</small>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{% if i.available_from or i.available_until %}
|
{% if i.available_from or i.available_until %}
|
||||||
@@ -70,6 +80,8 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if i.admission %}
|
{% if i.admission %}
|
||||||
<span class="fa fa-user fa-fw text-muted" data-toggle="tooltip" title="{% trans "Admission ticket" %}"></span>
|
<span class="fa fa-user fa-fw text-muted" data-toggle="tooltip" title="{% trans "Admission ticket" %}"></span>
|
||||||
|
{% elif i.issue_giftcard %}
|
||||||
|
<span class="fa fa-gift fa-fw text-muted" data-toggle="tooltip" title="{% trans "Gift card" %}"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -81,6 +93,9 @@
|
|||||||
{% if i.category.is_addon %}
|
{% if i.category.is_addon %}
|
||||||
<span class="fa fa-puzzle-piece fa-fw text-muted" data-toggle="tooltip"
|
<span class="fa fa-puzzle-piece fa-fw text-muted" data-toggle="tooltip"
|
||||||
title="{% trans "Only available as an add-on product" %}"></span>
|
title="{% trans "Only available as an add-on product" %}"></span>
|
||||||
|
{% elif i.require_bundling %}
|
||||||
|
<span class="fa fa-puzzle-piece fa-fw text-muted" data-toggle="tooltip"
|
||||||
|
title="{% trans "Only available as part of a bundle" %}"></span>
|
||||||
{% elif i.hide_without_voucher %}
|
{% elif i.hide_without_voucher %}
|
||||||
<span class="fa fa-tags fa-fw text-muted" data-toggle="tooltip"
|
<span class="fa fa-tags fa-fw text-muted" data-toggle="tooltip"
|
||||||
title="{% trans "Only visible with a voucher" %}"></span>
|
title="{% trans "Only visible with a voucher" %}"></span>
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ from pretix.control.signals import item_forms, item_formsets
|
|||||||
from pretix.helpers.models import modelcopy
|
from pretix.helpers.models import modelcopy
|
||||||
|
|
||||||
from . import ChartContainingView, CreateView, PaginationMixin, UpdateView
|
from . import ChartContainingView, CreateView, PaginationMixin, UpdateView
|
||||||
|
from ...base.channels import get_all_sales_channels
|
||||||
|
|
||||||
|
|
||||||
class ItemList(ListView):
|
class ItemList(ListView):
|
||||||
@@ -66,6 +67,11 @@ class ItemList(ListView):
|
|||||||
'category__position', 'category', 'position'
|
'category__position', 'category', 'position'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
ctx = super().get_context_data(**kwargs)
|
||||||
|
ctx['sales_channels'] = get_all_sales_channels()
|
||||||
|
return ctx
|
||||||
|
|
||||||
|
|
||||||
def item_move(request, item, up=True):
|
def item_move(request, item, up=True):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user