]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/templates/wall_thread.tpl
Add active response support to frio theme (continued)
[friendica.git] / view / theme / frio / templates / wall_thread.tpl
index b2e10a10a16ba01e514b326adedaffcd01cf9493..2e05cf7523c87469a29f4a75cfcc21f1391fa46c 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
 
 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.
 
 - 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}});">
        {{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>
                                        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 />
                                        class="hide-comments fakelink">{{$item.hide_text}}</span>
                        </div>
                        <hr />
@@ -59,7 +59,6 @@ as the value of $top_child_total (this is done at the end of this file)
 <div class="wall-item-decor" style="display:none;">
        <span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
        {{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
 <div class="wall-item-decor" style="display:none;">
        <span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
        {{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 -->
 
 </div>
 <!-- ./TODO => Unknow block -->
 
@@ -67,13 +66,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}}
 
 {{* 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{{/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}}"><!-- wall-item-container -->
 {{else}}
 {{else}}
-<div class="wall-item-container {{$item.indent}} {{$item.shiny}} {{$item.network}} thread_level_7" 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}}">
  {{/if}}
        <div class="media">
                {{* Put addional actions in a top-right dropdown menu *}}
  {{/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>
 
                <ul class="nav nav-pills preferences">
                        <li><span class="wall-item-network" title="{{$item.app}}">{{$item.network_name}}</span></li>
 
@@ -84,7 +83,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenuTools-{{$item.id}}">
                                        {{if $item.plink}}      {{*link to the original source of the item *}}
                                        <li role="menuitem">
                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenuTools-{{$item.id}}">
                                        {{if $item.plink}}      {{*link to the original source of the item *}}
                                        <li role="menuitem">
-                                               <a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="navicon plink"><i class="fa fa-external-link"></i> {{$item.plink.title}}</a>
+                                               <a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="navicon plink u-url"><i class="fa fa-external-link"></i> {{$item.plink.title}}</a>
                                        </li>
                                        {{/if}}
 
                                        </li>
                                        {{/if}}
 
@@ -140,10 +139,10 @@ as the value of $top_child_total (this is done at the end of this file)
                {{* The avatar picture and the photo-menu *}}
                <div class="dropdown pull-left"><!-- Dropdown -->
                        {{if $item.thread_level==1}}
                {{* The avatar picture and the photo-menu *}}
                <div class="dropdown pull-left"><!-- Dropdown -->
                        {{if $item.thread_level==1}}
-                       <div class="hidden-sm hidden-xs contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}}">
-                               <a class="userinfo" id="wall-item-photo-menu-{{$item.id}}" href="{{$item.profile_url}}">
+                       <div class="hidden-sm hidden-xs contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}} p-author h-card">
+                               <a class="userinfo" id="wall-item-photo-menu-{{$item.id}} u-url" href="{{$item.profile_url}}">
                                        <div class="contact-photo-image-wrapper">
                                        <div class="contact-photo-image-wrapper">
-                                               <img src="{{$item.thumb}}" class="contact-photo media-object {{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" />
+                                               <img src="{{$item.thumb}}" class="contact-photo media-object {{$item.sparkle}} p-name u-photo" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" />
                                        </div>
                                </a>
                        </div>
                                        </div>
                                </a>
                        </div>
@@ -168,10 +167,10 @@ as the value of $top_child_total (this is done at the end of this file)
 
                        {{* The avatar picture for comments *}}
                        {{if $item.thread_level!=1}}
 
                        {{* The avatar picture for comments *}}
                        {{if $item.thread_level!=1}}
-                       <div class="contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}}">
-                               <a class="userinfo" id="wall-item-photo-menu-{{$item.id}}" href="{{$item.profile_url}}">
+                       <div class="contact-photo-wrapper mframe{{if $item.owner_url}} wwfrom{{/if}} p-author h-card">
+                               <a class="userinfo" id="wall-item-photo-menu-{{$item.id}} u-url" href="{{$item.profile_url}}">
                                        <div class="contact-photo-image-wrapper">
                                        <div class="contact-photo-image-wrapper">
-                                               <img src="{{$item.thumb}}" class="contact-photo-xs media-object {{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" />
+                                               <img src="{{$item.thumb}}" class="contact-photo-xs media-object {{$item.sparkle}} p-name u-photo" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" />
                                        </div>
                                </a>
                        </div>
                                        </div>
                                </a>
                        </div>
@@ -190,7 +189,8 @@ 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">
 
                        <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">{{$item.ago}}</span></a></small>
+                                       <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}}
                                </div>
 
                                {{if $item.location}}
@@ -239,10 +239,10 @@ as the value of $top_child_total (this is done at the end of this file)
                        {{/if}}
 
                        {{if $item.title}}
                        {{/if}}
 
                        {{if $item.title}}
-                       <span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
+                       <span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h4><br /></span>
                        {{/if}}
 
                        {{/if}}
 
-                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body}}</div>
+                       <div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" id="wall-item-body-{{$item.id}}">{{$item.body}}</div>
                </div>
 
                <!-- TODO -->
                </div>
 
                <!-- TODO -->
@@ -259,11 +259,11 @@ as the value of $top_child_total (this is done at the end of this file)
                                {{/foreach}}
 
                                {{foreach $item.folders as $cat}}
                                {{/foreach}}
 
                                {{foreach $item.folders as $cat}}
-                                       <span class='folder label btn-danger sm'>{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
+                                       <span class='folder label btn-danger sm'><span class="p-category">{{$cat.name}}</span></a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
                                {{/foreach}}
 
                                {{foreach $item.categories as $cat}}
                                {{/foreach}}
 
                                {{foreach $item.categories as $cat}}
-                                       <span class='category label btn-success sm'>{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
+                                       <span class='category label btn-success sm'><span class="p-category">{{$cat.name}}</span></a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
                                {{/foreach}}
                        </div>
                                {{if $item.edited}}<div class="itemedited text-muted">{{$item.edited['label']}} (<span title="{{$item.edited['date']}}">{{$item.edited['relative']}}</span>)</div>{{/if}}
                                {{/foreach}}
                        </div>
                                {{if $item.edited}}<div class="itemedited text-muted">{{$item.edited['label']}} (<span title="{{$item.edited['date']}}">{{$item.edited['relative']}}</span>)</div>{{/if}}
@@ -285,7 +285,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}}
                                {{* 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}}
                                        {{/if}}
 
                                        {{if $item.vote.like AND $item.vote.dislike}}
@@ -293,7 +293,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                        {{/if}}
 
                                        {{if $item.vote.dislike}}
                                        {{/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}}
                                        {{/if}}
 
                                        {{if ($item.vote.like OR $item.vote.dislike) AND $item.comment}}
@@ -312,7 +312,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}}
                                        <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>
                                        {{/if}}
                                {{/if}}
                        </div>
@@ -321,9 +321,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">
                                {{* 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}}
 
                                </div>
                                {{/if}}