]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/templates/search_item.tpl
Merge remote-tracking branch 'upstream/develop' into develop
[friendica.git] / view / theme / frio / templates / search_item.tpl
index 122a86ae860ddff8223c7a465207e1c8258348b7..90fbe03bbcac66305d366835959099455377272b 100644 (file)
@@ -7,7 +7,7 @@
 <!-- ./TODO => Unknow block -->
 
 
-<div class="panel">    
+<div class="panel">
        <div class="wall-item-container panel-body{{$item.indent}} {{$item.shiny}} {{$item.previewing}}" >
                <div class="media">
                        {{* Put additional actions in a top-right dropdown menu *}}
 
                                        {{* Buttons for like and dislike *}}
                                        {{if $item.vote}}
-                                       <div class="vote-like pull-left">
-                                               <a role="button" href="#" class="button-likes" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false;">{{$item.vote.like.0}}</a>
+                                               {{if $item.vote.like}}
+                                               <a role="button" href="#" class="button-likes{{if $item.responses.like.self}} active{{/if}}" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false;">{{$item.vote.like.0}}</a>
+                                               {{/if}}
+
+                                               {{if $item.vote.like AND $item.vote.dislike}}
+                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               {{/if}}
 
                                                {{if $item.vote.dislike}}
-                                               <span role="presentation" class="seperator">&nbsp;•&nbsp;</span>
-                                               <a role="button" href="#" class="button-likes" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false;">{{$item.vote.dislike.0}}</a>
+                                               <a role="button" href="#" class="button-likes{{if $item.responses.like.self}} active{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false;">{{$item.vote.dislike.0}}</a>
                                                {{/if}}
 
-                                               {{if $item.comment}}<span role="presentation" class="seperator">&nbsp;•&nbsp;</span>{{/if}}
-                                       </div>
+                                               {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
+                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               {{/if}}
                                        {{/if}}
 
                                        {{* Butten to open the comment text field *}}
                                        {{if $item.comment}}
-                                       <div id="button-reply" class="pull-left">
-                                               <a role="button" class="" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}} </a>
-                                       </div>
+                                       <a role="button" class="" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});">{{$item.switchcomment}} </a>
                                        {{/if}}
 
                                        {{* Button for sharing the item *}}
                                        {{if $item.vote}}
+                                               {{if ($item.vote.like OR $item.vote.dislike OR $item.comment) AND $item.vote.share}}
+                                               <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
+                                               {{/if}}
                                                {{if $item.vote.share}}
-                                               <span role="presentation" class="seperator">&nbsp;•&nbsp;</span>
                                                <a role="button" href="#" class="" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false;"><i class="fa fa-retweet"></i>&nbsp;{{$item.vote.share.0}}</a>
                                                {{/if}}
                                        {{/if}}
                                        {{* Event attendance buttons *}}
                                        {{if $item.isevent}}
                                        <div class="vote-event">
-                                               <a role="button" href="#" class="button-event" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="fa fa-check"><span class="sr-only">{{$item.attend.0}}</span></i></a>
-                                               <a role="button" href="#" class="button-event" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="fa fa-times"><span class="sr-only">{{$item.attend.1}}</span></i></a>
-                                               <a role="button" href="#" class="button-event" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="fa fa-question"><span class="sr-only">{{$item.attend.2}}</span></i></a>
+                                               <a role="button" href="#" class="button-event{{if $item.responses.attendyes.self}} active{{/if}}" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="fa fa-check"><span class="sr-only">{{$item.attend.0}}</span></i></a>
+                                               <a role="button" href="#" class="button-event{{if $item.responses.attendno.self}} active{{/if}}" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="fa fa-times"><span class="sr-only">{{$item.attend.1}}</span></i></a>
+                                               <a role="button" href="#" class="button-event{{if $item.responses.attendmaybe.self}} active{{/if}}" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="fa fa-question"><span class="sr-only">{{$item.attend.2}}</span></i></a>
                                        </div>
                                        {{/if}}