mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Creation of the Stock list, edit, create views and creation StockItem create view
This commit is contained in:
@ -31,14 +31,14 @@
|
||||
{% if user.can_edit(c) %}
|
||||
<a href="{{ url('counter:admin', counter_id=c.id) }}">{% trans %}Edit{% endtrans %}</a> -
|
||||
<a href="{{ url('counter:stats', counter_id=c.id) }}">{% trans %}Stats{% endtrans %}</a> -
|
||||
{%if c.stock %}
|
||||
<a href="{{ url('stock:main', stock_id=c.stock.id) }}">Stock</a> -
|
||||
{% else %}
|
||||
<a href="{{ url('stock:new', counter_id=c.id) }}">{% trans %}Create new stock{% endtrans%}</a> -
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if user.is_owner(c) %}
|
||||
<a href="{{ url('counter:prop_admin', counter_id=c.id) }}">{% trans %}Props{% endtrans %}</a> -
|
||||
{%if c.stock %}
|
||||
<a href="{{ url('stock:main', stock_id=c.stock.id) }}">{{c.stock}}</a>
|
||||
{% else %}
|
||||
<a href="{{ url('stock:new', counter_id=c.id) }}">{% trans %}Create new stock{% endtrans%}</a>
|
||||
{% endif %}
|
||||
<a href="{{ url('counter:prop_admin', counter_id=c.id) }}">{% trans %}Props{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
@ -443,6 +443,11 @@ class CounterLogout(RedirectView):
|
||||
class CounterAdminTabsMixin(TabedViewMixin):
|
||||
tabs_title = _("Counter administration")
|
||||
list_of_tabs = [
|
||||
{
|
||||
'url': reverse_lazy('stock:list'),
|
||||
'slug': 'stocks',
|
||||
'name': _("Stocks"),
|
||||
},
|
||||
{
|
||||
'url': reverse_lazy('counter:admin_list'),
|
||||
'slug': 'counters',
|
||||
|
Reference in New Issue
Block a user