mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Improvements in counter admin templates
This commit is contained in:
@ -66,7 +66,8 @@ class ProductsLookup(RightManagedLookupChannel):
|
||||
model = Product
|
||||
|
||||
def get_query(self, q, request):
|
||||
return (self.model.objects.filter(name__icontains=q) | self.model.objects.filter(code__icontains=q))[:50]
|
||||
return (self.model.objects.filter(name__icontains=q) |
|
||||
self.model.objects.filter(code__icontains=q)).filter(archived=False)[:50]
|
||||
|
||||
def format_item_display(self, item):
|
||||
return item.name
|
||||
|
@ -25,7 +25,7 @@
|
||||
<h5>{% trans %}General management{% endtrans %}</h5>
|
||||
<li><a href="{{ url('counter:admin_list') }}">{% trans %}General counters management{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:product_list') }}">{% trans %}Products management{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:producttype_list') }}">{% trans %}Products type management{% endtrans %}</a></li>
|
||||
<li><a href="{{ url('counter:producttype_list') }}">{% trans %}Product types management{% endtrans %}</a></li>
|
||||
{% endif %}
|
||||
{% for b in settings.SITH_COUNTER_BARS %}
|
||||
{% if user.is_in_group(b[1]+" admin") %}
|
||||
|
Reference in New Issue
Block a user