Shopping list structure view addition

This commit is contained in:
guillaume-renaud
2016-11-24 10:40:42 +01:00
parent 9d8264bcbb
commit 5b2f126eee
5 changed files with 31 additions and 13 deletions

View File

@ -7,6 +7,7 @@
{% block content %}
{% if current_tab == "stocks" %}
<p><a href="{{ url('stock:new_item', stock_id=stock.id)}}">{% trans %}New item{% endtrans %}</a></p>
<h5><a href="{{ url('stock:shopping_list', stock_id=stock.id)}}">{% trans %}Shopping list{% endtrans %}</a></h5>
{% endif %}
{% if stock %}
<h3>{{ stock }}</h3>

View File

@ -11,7 +11,7 @@
{% for s in stock_list.order_by('name') %}
<li>
{% if user.can_edit(s) %}
<a href="{{ url('stock:items_list', stock_id=s.id)}}">{{s}}</a>
<a href="{{ url('stock:items_list', stock_id=s.id) }}">{{s}}</a>
- <a href="{{ url('stock:edit', stock_id=s.id) }}">Edit</a>
{% endif %}
</li>

View File

@ -0,0 +1,10 @@
{% extends "core/base.jinja" %}
{% block title %}
Shopping list for {{ stock }}
{% endblock %}
{% block content %}
<h3>Shopping list for {{ stock }}</h3>
{% endblock %}