Creation of the Stock list, edit, create views and creation StockItem create view

This commit is contained in:
guillaume-renaud
2016-11-09 17:49:19 +01:00
parent ccb339b9bd
commit 887893fb2d
9 changed files with 2972 additions and 14 deletions

View 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 %}

View File

@ -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 %}