# HG changeset patch # User Goffi # Date 1492454771 -7200 # Node ID 7353e5c54359fb0bf288b7c18048625080daef80 # Parent f1c773126f23bcbb9767ab9e9e57c75ce6ffc9f7 blog/articles: comments are now displayed if chained, and allow_commenting activate commenting form diff -r f1c773126f23 -r 7353e5c54359 default/blog/articles.html --- a/default/blog/articles.html Mon Apr 17 20:45:09 2017 +0200 +++ b/default/blog/articles.html Mon Apr 17 20:46:11 2017 +0200 @@ -1,9 +1,27 @@ {% extends 'base/base.html' %} +{% import 'input/comments.html' as comments %} + + +{% macro show_items(items) %} + {# show items and comments items if present after each item, + then post form if allow_commenting is set #} + {% for item in items %} + {% include 'blog/item.html' %} + {% for comments_items in item.comments_items_list %} + {% if allow_commenting %} +
+ {{ comments.comment(service=comments_items.service, node=comments_items.node) }} +
+ {% endif %} +
+ {{show_items(comments_items)}} +
+ {% endfor %} + {% endfor %} +{% endmacro %} {% block body %}
- {% for item in items %} - {% include 'blog/item.html' %} - {% endfor %} + {{ show_items(items) }}
{% endblock body %}