comparison default/blog/macros.html @ 116:da8f1ba9034d

input/comment: renamed "comment" library to "textbox", and made it more generic
author Goffi <goffi@goffi.org>
date Tue, 30 Jan 2018 07:47:23 +0100
parents 2963996373fa
children
comparison
equal deleted inserted replaced
115:5d9e2270ceb4 116:da8f1ba9034d
1 {% import 'input/comment.html' as comment with context %} 1 {% import 'input/textbox.html' as textbox with context %}
2 2
3 {% macro show_items(items, comments=False, expanded=false, dates_fmt=none) %} 3 {% macro show_items(items, comments=False, expanded=false, dates_fmt=none) %}
4 {# show items and comments items if present after each item, 4 {# show items and comments items if present after each item,
5 then post form if allow_commenting is set 5 then post form if allow_commenting is set
6 @param items(BlogItems): items to show 6 @param items(BlogItems): items to show
24 ({{comments_items|count}}) 24 ({{comments_items|count}})
25 </button> 25 </button>
26 <div id="{{'comments_panel'|cur_gidx}}" class="comments_panel"> 26 <div id="{{'comments_panel'|cur_gidx}}" class="comments_panel">
27 {% if allow_commenting %} 27 {% if allow_commenting %}
28 <div class="comment_post"> 28 <div class="comment_post">
29 {{- comment.comment(service=comments_items.service, node=comments_items.node) -}} 29 {{- textbox.comment(service=comments_items.service, node=comments_items.node) -}}
30 </div> 30 </div>
31 {% endif %} 31 {% endif %}
32 32
33 <div class="comments"> 33 <div class="comments">
34 {{show_items(comments_items, comments=True)}} 34 {{show_items(comments_items, comments=True)}}