comparison default/blog/macros.html @ 92:2963996373fa

blog (macros): fixed "show comments" button
author Goffi <goffi@goffi.org>
date Fri, 12 Jan 2018 19:53:18 +0100
parents f19e9f5e43b0
children da8f1ba9034d
comparison
equal deleted inserted replaced
91:cc36a5b990ab 92:2963996373fa
16 {% include 'blog/item.html' %} 16 {% include 'blog/item.html' %}
17 {% if not comments %}</div>{% endif %} 17 {% if not comments %}</div>{% endif %}
18 18
19 {# we recursively display comments for all comments nodes (usually there's only one) #} 19 {# we recursively display comments for all comments nodes (usually there's only one) #}
20 {% for comments_items in item.comments_items_list %} 20 {% for comments_items in item.comments_items_list %}
21 <button class="comments_btn" onclick="clicked_mh_fix('{{comments_panel|next_gidx}}');clicked_cls(this)"> 21 <button class="comments_btn" onclick="clicked_mh_fix('{{'comments_panel'|next_gidx}}');clicked_cls(this)">
22 <span class='show'>{% trans %}show comments{% endtrans %}</span> 22 <span class='show'>{% trans %}show comments{% endtrans %}</span>
23 <span class='hide'>{% trans %}hide comments{% endtrans %}</span> 23 <span class='hide'>{% trans %}hide comments{% endtrans %}</span>
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 {{- comment.comment(service=comments_items.service, node=comments_items.node) -}}
30 </div> 30 </div>
31 {% endif %} 31 {% endif %}