added comment form plus number of comments.
[~kgodey/maayanwich.git] / templates / allsandwiches.html
index d55cdb9..17c40df 100644 (file)
                                {% endfor %}
                        </ul>
                        {% if s.notes %}
-                               <h4 class="sandwichsub">Notes</h5>
+                               <h4 class="sandwichsub">Notes</h4>
                                <p class="sandnotes"> {{ s.notes }}</p>
                        {% endif %}
+                       {% load comments %}
+                       {% get_comment_count for s as c %}
+                       {% ifequal c 1 %}
+                               <p class="sandnotes"><a href="{{ s.get_absolute_url }}">1 comment</a></p>
+                       {% else %}
+                               <p class="sandnotes"><a href="{{ s.get_absolute_url }}">{{ c }} comments</a></p>
+                       {% endifequal %}
                {% endfor %}
 {% endblock %}
\ No newline at end of file