{{* This is a little bit hacky. This is needed to have some sort comments container. It would be better if it would be done in friendica core but since core lacks this functionality it is done in the theme In short: the piece of code counts the total number of children of the toplevelpost - this are usaly all posts with thread_level = 2 - and stores it in variable $top_children_total. The first time a children which hits thread_level = 2 and $top_child = 1 opens the div. Everytime when a children with top_level = 2 comes up $top_child_nr rises with 1. The div get's closed if thread_level = 2 and the value of $top_child_nr is the same as the value of $top_child_total (this is done at the end of this file) *}} {{if $item.thread_level==1}} {{assign var="top_child_total" value=count($item.children)}} {{assign var="top_child_nr" value=0}} {{/if}} {{if $item.thread_level==2}} {{assign var="top_child_nr" value=$top_child_nr+1 scope=parent}} {{/if}} {{if $item.thread_level==2 && $top_child_nr==1}}
{{if $item.plink}} {{*link to the original source of the item *}}-
{{$item.plink.title}}
{{/if}}
{{if $item.edpost}} {{* edit the posting *}}
-
{{/if}}
{{if $item.tagger}} {{* tag the post *}}
-
{{/if}}
{{if $item.filer}}
-
{{/if}}
{{if $item.star}}
-
{{/if}}
{{if $item.subthread}}
-
{{/if}}
{{if $item.ignore || $item.drop.dropping}}
{{/if}}
{{if $item.ignore}}
-
-
{{/if}}
{{if $item.drop.dropping}}
-
{{/if}}
{{$item.name}} {{if $item.owner_url}}{{$item.via}} {{$item.owner_name}}{{/if}} {{if $item.lock}} {{/if}}
{{$item.name}}
{{$item.ago}} {{if $item.location}} — ({{$item.location nofilter}}){{/if}} {{if $item.owner_self}} {{include file="sub/delivery_count.tpl" delivery=$item.delivery}} {{/if}}
{{$item.name}} {{$item.ago}} {{if $item.location}} — ({{$item.location nofilter}}){{/if}} {{if $item.owner_self}} {{include file="sub/delivery_count.tpl" delivery=$item.delivery}} {{/if}}
{{/if}} {{* item content *}}
{{$item.title}}
{{/if}}
{{* Action buttons to interact with the item (like: like, dislike, share and so on *}} {{if $item.threaded}}{{/if}} {{* Buttons for like and dislike *}} {{if $item.vote}} {{if $item.vote.like}} {{/if}} {{if $item.vote.like AND $item.vote.dislike}} • {{/if}} {{if $item.vote.dislike}} {{/if}} {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}} • {{/if}} {{/if}} {{* Button to open the comment text field *}} {{if $item.comment}} {{/if}} {{* Button for sharing the item *}} {{if $item.vote}} {{if $item.vote.share}} {{if $item.vote.like OR $item.vote.dislike OR $item.comment}} • {{/if}} {{/if}} {{/if}} {{* Event attendance buttons *}} {{if $item.isevent}} {{/if}} {{if $item.drop.pagedrop}} {{/if}}
{{* Display likes, dislike and attendance stats *}} {{if $item.responses}}