try comment show with link
This commit is contained in:
parent
49a186f72f
commit
d1f9c12c2d
8 changed files with 264 additions and 60 deletions
|
@ -1,5 +1,3 @@
|
|||
{% set logged_in = request.user.is_authenticated %}
|
||||
{% set profile = request.profile if logged_in else None %}
|
||||
{% for node in mptt_tree(comment_list) recursive %}
|
||||
<li id="comment-{{ node.id }}" data-revision="{{ node.revisions - 1 }}" data-max-revision="{{ node.revisions - 1 }}"
|
||||
data-revision-ajax="{{ url('comment_revision_ajax', node.id) }}" class="comment">
|
||||
|
@ -99,18 +97,41 @@
|
|||
</div>
|
||||
|
||||
{% if node.count_replies > 1 %}
|
||||
<a href="javascript:comment_get_replies({{ node.id }}, {{ object.id }})" class="show_more_reply"> {{ node.count_replies }} {{
|
||||
_(' Replies ') }} </a>
|
||||
<a href="javascript:comment_get_replies({{ node.id }}, 0)" class="show_more_reply">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-forward" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M15 11l4 4l-4 4m4 -4h-11a4 4 0 0 1 0 -8h1"></path>
|
||||
</svg>
|
||||
{{ node.count_replies }} {{_(' replies ') }} </a>
|
||||
{% elif node.count_replies %}
|
||||
<a href="javascript:comment_get_replies({{ node.id }}, {{ object.id }})" class="show_more_reply"> {{ node.count_replies }} {{
|
||||
_(' Reply ') }} </a>
|
||||
<a href="javascript:comment_get_replies({{ node.id }}, 0)" class="show_more_reply">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-arrow-forward" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M15 11l4 4l-4 4m4 -4h-11a4 4 0 0 1 0 -8h1"></path>
|
||||
</svg>
|
||||
{{ node.count_replies }} {{_(' reply ') }} </a>
|
||||
{% endif %}
|
||||
</li>
|
||||
<ul id="comment-{{ node.id }}-reply" class="reply-comment" hidden></ul>
|
||||
<ul id="comment-{{ node.id }}-children" class="comments"> </ul>
|
||||
{% endfor %}
|
||||
|
||||
{% if comment_count - offset > 0 %}
|
||||
<a href="javascript:comment_show_more({{ comment_root_id }}, {{ object.id }}, {{ offset }} )" class="show_more_comment">
|
||||
{{ comment_count - offset }} replies more</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% set comment_more = comment_count - offset %}
|
||||
{% if comment_more == 1 %}
|
||||
<a href="javascript:comment_show_more({{ comment_root_id }}, {{ comment_parrent_none }}, {{ offset }} )" class="show_more_comment">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M6 9l6 6l6 -6"></path>
|
||||
</svg>
|
||||
{{ comment_count - offset }} comment more</a>
|
||||
{% elif comment_more > 1 %}
|
||||
<a href="javascript:comment_show_more({{ comment_root_id }}, {{ comment_parrent_none }}, {{ offset }} )" class="show_more_comment">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-down" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||
<path d="M6 9l6 6l6 -6"></path>
|
||||
</svg>
|
||||
{{ comment_count - offset }} comments more</a>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue