Mercurial > libervia-templates
diff default/blog/articles.html @ 10:8b5615a1bf3d
articles, input: use new embedding mechanism in articles + new macros to build forms and inputs
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 27 Apr 2017 01:07:28 +0200 |
parents | 7353e5c54359 |
children | 8cdcbe0d7dee |
line wrap: on
line diff
--- a/default/blog/articles.html Thu Apr 27 01:05:16 2017 +0200 +++ b/default/blog/articles.html Thu Apr 27 01:07:28 2017 +0200 @@ -1,22 +1,26 @@ -{% extends 'base/base.html' %} -{% import 'input/comments.html' as comments %} - +{% if not embedded %}{% extends 'base/base.html' %}{% endif %} +{% import 'input/comment.html' as comment %} {% 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 %} <div id="comment_post"> - {{ comments.comment(service=comments_items.service, node=comments_items.node) }} + {{ comment.comment(service=comments_items.service, node=comments_items.node) }} </div> {% endif %} + <div class="comments"> {{show_items(comments_items)}} </div> + {% endfor %} + {% endfor %} {% endmacro %}