]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/templates/wall_thread.tpl
Merge pull request #3213 from Hypolite/issue/#2792-2
[friendica.git] / view / theme / frio / templates / wall_thread.tpl
index 21792d41cfbdae6c4cf0caccff0355f1f3dcb28c..1977f541c231562bad5b0d529b1ac3fb811f8ed8 100644 (file)
@@ -3,7 +3,7 @@
 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 
+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.
 
@@ -41,9 +41,9 @@ as the value of $top_child_total (this is done at the end of this file)
        {{if $item.thread_level<3}}
                <div class="hide-comments-outer-wrapper">
                        <div class="hide-comments-outer btn-link" onclick="showHideComments({{$item.id}});">
-                               <span id="hide-comments-total-{{$item.id}}" 
+                               <span id="hide-comments-total-{{$item.id}}"
                                        class="hide-comments-total">{{$item.num_comments}}</span>
-                               <span id="hide-comments-{{$item.id}}" 
+                               <span id="hide-comments-{{$item.id}}"
                                        class="hide-comments fakelink">{{$item.hide_text}}</span>
                        </div>
                        <hr />
@@ -57,9 +57,10 @@ as the value of $top_child_total (this is done at the end of this file)
 
 <!-- TODO => Unknow block -->
 <div class="wall-item-decor" style="display:none;">
+       {{if $item.star}}
        <span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
+       {{/if}}
        {{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
-       <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
 </div>
 <!-- ./TODO => Unknow block -->
 
@@ -67,13 +68,13 @@ as the value of $top_child_total (this is done at the end of this file)
 
 {{* Use a different div container in dependence max thread-level = 7 *}}
 {{if $item.thread_level<7}}
-<div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}} thread_level_{{$item.thread_level}} {{if $item.thread_level==1}}panel-body h-entry{{else}}u-comment h-cite{{/if}}" id="item-{{$item.guid}}"><!-- wall-item-container -->
+<div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}} thread_level_{{$item.thread_level}} {{if $item.thread_level==1}}panel-body h-entry{{else}}u-comment h-cite{{/if}}" id="item-{{$item.guid|regex_replace:'/%.*/':''}}"><!-- wall-item-container -->
 {{else}}
-<div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}} thread_level_7 u-comment h-cite" id="item-{{$item.guid}}">
+<div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}} thread_level_7 u-comment h-cite" id="item-{{$item.guid|regex_replace:'/%.*/':''}}">
  {{/if}}
        <div class="media">
                {{* Put addional actions in a top-right dropdown menu *}}
-               
+
                <ul class="nav nav-pills preferences">
                        <li><span class="wall-item-network" title="{{$item.app}}">{{$item.network_name}}</span></li>
 
@@ -191,6 +192,7 @@ as the value of $top_child_total (this is done at the end of this file)
                        <div class="additional-info text-muted">
                                <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago">
                                        <small><a href="{{$item.plink.orig}}"><span class="time" title="{{$item.localtime}}" data-toggle="tooltip"><time class="dt-published" datetime="{{$item.localtime}}">{{$item.ago}}</time></span></a></small>
+                                       <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
                                </div>
 
                                {{if $item.location}}
@@ -285,7 +287,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                {{* Buttons for like and dislike *}}
                                {{if $item.vote}}
                                        {{if $item.vote.like}}
-                                       <a role="button" class="button-likes" id="like-{{$item.id}}" title="{{$item.vote.like.1}}" onclick="dolike({{$item.id}},'like'); return false;"><i class="fa fa-thumbs-up"></i>&nbsp;{{$item.vote.like.1}}</a>
+                                       <a role="button" 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;"><i class="fa fa-thumbs-up"></i>&nbsp;{{$item.vote.like.1}}</a>
                                        {{/if}}
 
                                        {{if $item.vote.like AND $item.vote.dislike}}
@@ -293,7 +295,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                        {{/if}}
 
                                        {{if $item.vote.dislike}}
-                                       <a role="button" class="button-likes" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.1}}" onclick="dolike({{$item.id}},'dislike'); return false;"><i class="fa fa-thumbs-down"></i>&nbsp;{{$item.vote.dislike.1}}</a>
+                                       <a role="button" class="button-likes{{if $item.responses.dislike.self}} active{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false;"><i class="fa fa-thumbs-down"></i>&nbsp;{{$item.vote.dislike.1}}</a>
                                        {{/if}}
 
                                        {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
@@ -312,7 +314,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                        <span role="presentation" class="separator">&nbsp;•&nbsp;</span>
                                        {{/if}}
                                        {{if $item.vote.share}}
-                                       <a role="button" class="button-votes" 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>
+                                       <a role="button" class="button-votes" 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.1}}</a>
                                        {{/if}}
                                {{/if}}
                        </div>
@@ -321,9 +323,9 @@ as the value of $top_child_total (this is done at the end of this file)
                                {{* Event attendance buttons *}}
                                {{if $item.isevent}}
                                <div class="vote-event">
-                                       <a role="button" 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" 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" 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" 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" 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" 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}}