mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Add icon columns to product overview
This commit is contained in:
@@ -31,6 +31,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{% trans "Product name" %}</th>
|
<th>{% trans "Product name" %}</th>
|
||||||
|
<th class="iconcol"></th>
|
||||||
|
<th class="iconcol"></th>
|
||||||
|
<th class="iconcol"></th>
|
||||||
<th>{% trans "Category" %}</th>
|
<th>{% trans "Category" %}</th>
|
||||||
<th class="action-col-2"></th>
|
<th class="action-col-2"></th>
|
||||||
<th class="action-col-2"></th>
|
<th class="action-col-2"></th>
|
||||||
@@ -46,7 +49,25 @@
|
|||||||
<a href="
|
<a href="
|
||||||
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}">{{ i.name }}</a>
|
{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}">{{ i.name }}</a>
|
||||||
{% if not i.active %}</strike>{% endif %}
|
{% if not i.active %}</strike>{% endif %}
|
||||||
</strong></td>
|
</strong>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if i.admission %}
|
||||||
|
<span class="fa fa-user fa-fw text-muted" data-toggle="tooltip" title="{% trans "Admission ticket" %}"></span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if i.var_count %}
|
||||||
|
<span class="fa fa-list-ul fa-fw text-muted" data-toggle="tooltip" title="{% trans "Product with variations" %}"></span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% if i.hide_without_voucher %}
|
||||||
|
<span class="fa fa-ticket fa-fw text-muted" data-toggle="tooltip" title="{% trans "Only visible with a voucher" %}"></span>
|
||||||
|
{% elif i.require_voucher %}
|
||||||
|
<span class="fa fa-ticket fa-fw text-muted" data-toggle="tooltip" title="{% trans "Can only bought using a voucher" %}"></span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
<td>{% if i.category %}{{ i.category.name }}{% endif %}</td>
|
<td>{% if i.category %}{{ i.category.name }}{% endif %}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url "control:event.items.up" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
|
<a href="{% url "control:event.items.up" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ class ItemList(ListView):
|
|||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return Item.objects.filter(
|
return Item.objects.filter(
|
||||||
event=self.request.event
|
event=self.request.event
|
||||||
|
).annotate(
|
||||||
|
var_count=Count('variations')
|
||||||
).prefetch_related("category")
|
).prefetch_related("category")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -480,3 +480,6 @@ body.loading #wrapper {
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.iconcol {
|
||||||
|
width: 1.28571em;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user