Ingredients auto complete, adding ingredients works. Some template tweaks.
[~kgodey/maayanwich.git] / templates / onesandwich.html
1 {% extends "base.html" %}
2
3 {% block title %} The {{ s.adjective }} Ma'ayanwich {% endblock %}
4
5 {% block content %}
6         <h3 class="sandwichtitle">{{ s.adjective }}</h3>
7         <p class="metadata">Made on {{ s.date_made|date:"F j Y" }} and added by {% if s.user.first_name %} {{ s.user.first_name }} {% if s.user.last_name %} {{ s.user.last_name }} {% endif %} {% else %} {{ s.user.username }}. {% endif %}</p>
8         {% if s.picture %}
9                 <img class="sandwichimg" src="{{ s.picture.url }}">
10         {% endif %}
11         <h4 class="sandwichsub">Ingredients</h4>
12         <ul class="ingredients">
13                 {% for i in s.ingredients.all %}
14                         <li>{{ i.name }}
15                 {% endfor %}
16         </ul>
17         {% if s.notes %}
18                 <h4 class="sandwichsub">Notes</h5>
19                 <p class="sandnotes"> {{ s.notes }}</p>
20         {% endif %}
21         {% load comments %}
22         {% get_comment_count for s as c %}
23         <h4 class="sandwichsub">Comments</h5>
24         {% get_comment_list for s as clist %}
25         {% for comment in clist %}
26                 <p class="comment_user">{{ comment.user_name }} said:</p>
27                 <p class="sandnotes">{{ comment.comment }}</p>
28                 <p class="metadata">{{ comment.submit_date }}</p>
29         {% endfor %}
30 {% endblock %}