Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #2792 #2798

Merged
merged 11 commits into from Sep 25, 2016
4 changes: 4 additions & 0 deletions include/conversation.php
Expand Up @@ -1056,6 +1056,9 @@ function builtin_activity_puller($item, &$conv_responses) {
else
$conv_responses[$mode][$item['thr-parent']] ++;

if((local_user()) && (local_user() == $item['uid']) && ($item['self']))
$conv_responses[$mode][$item['thr-parent'] . '-self'] = 1;

$conv_responses[$mode][$item['thr-parent'] . '-l'][] = $url;

// there can only be one activity verb per item so if we found anything, we can stop looking
Expand Down Expand Up @@ -1435,6 +1438,7 @@ function get_responses($conv_responses,$response_verbs,$ob,$item) {
$ret[$v] = array();
$ret[$v]['count'] = ((x($conv_responses[$v],$item['uri'])) ? $conv_responses[$v][$item['uri']] : '');
$ret[$v]['list'] = ((x($conv_responses[$v],$item['uri'])) ? $conv_responses[$v][$item['uri'] . '-l'] : '');
$ret[$v]['self'] = ((x($conv_responses[$v],$item['uri'])) ? $conv_responses[$v][$item['uri'] . '-self'] : '0');
if(count($ret[$v]['list']) > MAX_LIKERS) {
$ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS);
array_push($ret[$v]['list_part'], '<a href="#" data-toggle="modal" data-target="#' . $v . 'Modal-'
Expand Down
10 changes: 5 additions & 5 deletions view/templates/wall_thread.tpl
Expand Up @@ -64,8 +64,8 @@
<div class="wall-item-tools" id="wall-item-tools-{{$item.id}}">
{{if $item.vote}}
<div class="wall-item-like-buttons" id="wall-item-like-buttons-{{$item.id}}">
<a href="#" class="icon like" title="{{$item.vote.like.0|escape:'html'}}" onclick="dolike({{$item.id}},'like'); return false"></a>
{{if $item.vote.dislike}}<a href="#" class="icon dislike" title="{{$item.vote.dislike.0|escape:'html'}}" onclick="dolike({{$item.id}},'dislike'); return false"></a>{{/if}}
<a href="#" class="icon like{{if $item.responses.like.self}} active{{/if}}" title="{{$item.vote.like.0|escape:'html'}}" onclick="dolike({{$item.id}},'like'); return false"></a>
{{if $item.vote.dislike}}<a href="#" class="icon dislike{{if $item.responses.dislike.self}} active{{/if}}" title="{{$item.vote.dislike.0|escape:'html'}}" onclick="dolike({{$item.id}},'dislike'); return false"></a>{{/if}}
{{if $item.vote.share}}<a href="#" class="icon recycle wall-item-share-buttons" title="{{$item.vote.share.0|escape:'html'}}" onclick="jotShare({{$item.id}}); return false"></a>{{/if}}
<img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait|escape:'html'}}" title="{{$item.wait|escape:'html'}}" style="display: none;" />
</div>
Expand All @@ -88,9 +88,9 @@
{{/if}}
{{if $item.isevent }}
<div class="wall-item-attend-wrapper">
<a href="#" id="attendyes-{{$item.id}}" class="icon attendyes" onclick="dolike({{$item.id}},'attendyes'); return false;" title="{{$item.attend.0|escape:'html'}}"></a>
<a href="#" id="attendno-{{$item.id}}" class="icon attendno" onclick="dolike({{$item.id}},'attendno'); return false;" title="{{$item.attend.1|escape:'html'}}"></a>
<a href="#" id="attendmaybe-{{$item.id}}" class="icon attendmaybe" onclick="dolike({{$item.id}},'attendmaybe'); return false;" title="{{$item.attend.2|escape:'html'}}"></a>
<a href="#" id="attendyes-{{$item.id}}" class="icon attendyes{{if $item.responses.attendyes.self}} active{{/if}}" onclick="dolike({{$item.id}},'attendyes'); return false;" title="{{$item.attend.0|escape:'html'}}"></a>
<a href="#" id="attendno-{{$item.id}}" class="icon attendno{{if $item.responses.attendno.self}} active{{/if}}" onclick="dolike({{$item.id}},'attendno'); return false;" title="{{$item.attend.1|escape:'html'}}"></a>
<a href="#" id="attendmaybe-{{$item.id}}" class="icon attendmaybe{{if $item.responses.attendmaybe.self}} active{{/if}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;" title="{{$item.attend.2|escape:'html'}}"></a>
</div>
{{/if}}
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$item.id}}" >
Expand Down
5 changes: 5 additions & 0 deletions view/theme/duepuntozero/style.css
Expand Up @@ -1154,6 +1154,11 @@ input#dfrn-url {
margin-right: 10px;
}

.wall-item-like-buttons > a.active,
.wall-item-attend-wrapper > a.active {
background-color: rgba(52, 101, 164, .5);
}

.editpost {
margin-left: 10px;
float: left;
Expand Down
29 changes: 17 additions & 12 deletions view/theme/frio/css/style.css
Expand Up @@ -3,7 +3,7 @@ To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
/*
Created on : 17.02.2016, 23:55:45
Author : rabuzarus
*/
Expand Down Expand Up @@ -171,7 +171,7 @@ a#item-delete-selected {
background: $btn_primary_hover_color;
border-color: none;
}

.btn-link {
/* color: #6fdbe8;*/
color: $link_color;
Expand Down Expand Up @@ -284,7 +284,7 @@ header #banner {
whitespace: nowrap;
padding-left: 55px;
}
header #banner #logo-img,
header #banner #logo-img,
.navbar-brand #logo-img {
/*mask: url('network#m1');*/
/*mask-image: url('img/friendica-25.png');*/
Expand Down Expand Up @@ -416,7 +416,7 @@ nav.navbar .nav>li>a:focus{
top: 4px;
right: -2px;
background-color: #ff8989;

/* text-transform: uppercase;
display: inline-block;
padding: 3px 5px 4px;
Expand Down Expand Up @@ -1086,7 +1086,7 @@ aside #group-sidebar li .group-edit-tool:first-child {
width: 90px;*/
}
#contact-block contact-block-link {

}
#contact-block .contact-block-img {
height: 75px;
Expand Down Expand Up @@ -1463,14 +1463,19 @@ blockquote.shared_content {
/* item social action buttons */
.wall-item-actions, .wall-item-actions a {
font-size: 13px;
/*color: #aeaeae;*/
color: #555;
margin-top: 15px;
margin-bottom: 0;
}
.wall-item-actions a.active {
font-weight: bold;
}
.wall-item-actions a:hover {
color: #555;
}
.wall-item-actions a.active:hover {
color: $link_color;
}
.wall-item-actions-left {
display: table-cell;
vertical-align: middle;
Expand Down Expand Up @@ -1641,7 +1646,7 @@ img.acpopup-img {
.wall-item-container.thread_level_6,
.wall-item-container.thread_level_7 {
margin-left: 15px;

}
/* Menubar Tabs */
#tabmenu,
Expand Down Expand Up @@ -1674,7 +1679,7 @@ ul.tabs li {
transition: all .15s ease;
}
/*ul.tabs.visible-xs > li.active {
min-width: 150px; This is a workaround to make the topbar-second dropdown better visible on mobile. We need something better here
min-width: 150px; This is a workaround to make the topbar-second dropdown better visible on mobile. We need something better here
}*/
ul.tabs li a {
margin-left: 10px;
Expand Down Expand Up @@ -1888,7 +1893,7 @@ ul.viewcontact_wrapper > li {
}
.contact-wrapper .contact-photo-image-wrapper img.contact-photo.xl {
height: 80px;
width: 80px;
width: 80px;
}
.contact-wrapper .contact-photo-image-wrapper img.contact-photo-xs {
height: 48px;
Expand All @@ -1905,7 +1910,7 @@ ul.viewcontact_wrapper > li {
margin-top: -20px;
}
.contact-wrapper .media-body .contact-entry-name h4.media-heading a {
font-weight: bold !important;
font-weight: bold !important;
color: $link_color;
font-size: 15px !important;
}
Expand Down Expand Up @@ -2265,7 +2270,7 @@ ul.notif-network-list > li:hover .intro-action-buttons {

/* Search Page */

/* This is a little bit hacky. Since the search page is used for diferent
/* This is a little bit hacky. Since the search page is used for diferent
content types we can't apply the generic-page-wrapper class.
So we apply the css of the generic-page-wrapper class to the ul element with some
little modifications to emulate a standard page template */
Expand Down Expand Up @@ -2374,7 +2379,7 @@ main .nav-tabs>li.active>a:hover {
#contact-list ul.dropdown-menu.textcomplete-dropdown.media-list > li:first-child {
display: none;
}
#contact-list ul.dropdown-menu.textcomplete-dropdown.media-list
#contact-list ul.dropdown-menu.textcomplete-dropdown.media-list
.textcomplete-item > a {
padding: 0 !important;
border-left: none;
Expand Down
12 changes: 6 additions & 6 deletions view/theme/frio/templates/search_item.tpl
Expand Up @@ -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 *}}
Expand Down Expand Up @@ -170,15 +170,15 @@
{{* Buttons for like and dislike *}}
{{if $item.vote}}
{{if $item.vote.like}}
<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>
<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}}
<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.vote.like OR $item.vote.dislike) AND $item.comment}}
Expand Down Expand Up @@ -207,9 +207,9 @@
{{* 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}}

Expand Down
22 changes: 11 additions & 11 deletions view/theme/frio/templates/wall_thread.tpl
Expand Up @@ -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.

Expand Down Expand Up @@ -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 />
Expand All @@ -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}}
<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 -->

Expand All @@ -73,7 +72,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{/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>

Expand Down Expand Up @@ -191,6 +190,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}}
Expand Down Expand Up @@ -285,15 +285,15 @@ 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}}
<span role="presentation" class="separator">&nbsp;•&nbsp;</span>
{{/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}}
Expand All @@ -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}}
<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>
Expand All @@ -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">
<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}}

Expand Down