[frio] Hide fake comment form when comment form isn't present

This commit is contained in:
Hypolite Petovan 2019-02-16 18:40:05 -05:00
parent ad30e4824c
commit 3cabddcdec
1 changed files with 3 additions and 5 deletions

View File

@ -408,24 +408,22 @@ as the value of $top_child_total (this is done at the end of this file)
{{* Insert the comment box of the top level post at the bottom of the thread. {{* Insert the comment box of the top level post at the bottom of the thread.
Display this comment box if there are any comments. If not hide it. In this Display this comment box if there are any comments. If not hide it. In this
case it could be opend with the "comment" button *}} case it could be opend with the "comment" button *}}
{{if $item.total_comments_num}} {{if $item.comment && $item.thread_level==1}}
{{if $item.total_comments_num}}
<div class="comment-fake-form" id="comment-fake-form-{{$item.id}}"> <div class="comment-fake-form" id="comment-fake-form-{{$item.id}}">
<textarea id="comment-fake-text-{{$item.id}}" class="comment-fake-text-empty form-control" placeholder="{{$item.reply_label}}" onFocus="commentOpenUI(this, {{$item.id}});" rows="1"></textarea> <textarea id="comment-fake-text-{{$item.id}}" class="comment-fake-text-empty form-control" placeholder="{{$item.reply_label}}" onFocus="commentOpenUI(this, {{$item.id}});" rows="1"></textarea>
</div> </div>
{{/if}} {{/if}}
{{if $item.comment && $item.thread_level==1}}
<div class="wall-item-comment-wrapper well well-small" id="item-comments-{{$item.id}}" data-display="block" style="display: none">{{$item.comment nofilter}}</div> <div class="wall-item-comment-wrapper well well-small" id="item-comments-{{$item.id}}" data-display="block" style="display: none">{{$item.comment nofilter}}</div>
{{/if}} {{/if}}
</div><!-- /media --> </div><!-- /media -->
</div><!-- ./panel-body or ./wall-item-container --> </div><!-- ./panel-body or ./wall-item-container -->
{{if $mode == display}} {{if $mode == display}}
{{else}} {{else}}
{{if $item.comment_lastcollapsed}}</div>{{/if}} {{if $item.comment_lastcollapsed}}</div>{{/if}}
{{/if}} {{/if}}
{{* close the comment-container div if no more thread_level = 2 children are left *}} {{* close the comment-container div if no more thread_level = 2 children are left *}}
{{if $item.thread_level==2 && $top_child_nr==$top_child_total}} {{if $item.thread_level==2 && $top_child_nr==$top_child_total}}
</div><!--./comment-container--> </div><!--./comment-container-->