mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 04:19:25 +00:00
Creation of the Stock list, edit, create views and creation StockItem create view
This commit is contained in:
23
stock/templates/stock/stock_list.jinja
Normal file
23
stock/templates/stock/stock_list.jinja
Normal file
@ -0,0 +1,23 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}Stock list{% endtrans %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if stock_list %}
|
||||
<h3>{% trans %}Stock list{% endtrans %}</h3>
|
||||
<ul>
|
||||
{% for s in stock_list.order_by('name') %}
|
||||
<li>
|
||||
{% if user.can_edit(s) %}
|
||||
<a href="{{ url('stock:main', stock_id=s.id) }}">{{s}}</a>
|
||||
- <a href="{{ url('stock:edit', stock_id=s.id) }}">Edit</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
{% trans %}There is no stocks in this website.{% endtrans %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
@ -6,6 +6,6 @@
|
||||
|
||||
{% block content %}
|
||||
<h3>{{stock}}</h3>
|
||||
<a href="{{ url('stock:new_item', stock_id=stock.id) }}">{{stock.name}}</a>
|
||||
<a href="{{ url('stock:new_item', stock_id=stock.id) }}">{% trans %}New Item{% endtrans %}</a>
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in New Issue
Block a user