subtle indicator of your own response verb activity
This commit is contained in:
parent
bfc2552841
commit
bba7fe24e9
@ -174,6 +174,11 @@ class ThreadItem {
|
|||||||
|
|
||||||
$responses = get_responses($conv_responses,$response_verbs,$this,$item);
|
$responses = get_responses($conv_responses,$response_verbs,$this,$item);
|
||||||
|
|
||||||
|
$my_responses = [];
|
||||||
|
foreach($response_verbs as $v) {
|
||||||
|
$my_responses[$v] = (($conv_responses[$v][$item['mid'] . '-m']) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
$like_count = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid']] : '');
|
$like_count = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid']] : '');
|
||||||
$like_list = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid'] . '-l'] : '');
|
$like_list = ((x($conv_responses['like'],$item['mid'])) ? $conv_responses['like'][$item['mid'] . '-l'] : '');
|
||||||
if (count($like_list) > MAX_LIKERS) {
|
if (count($like_list) > MAX_LIKERS) {
|
||||||
@ -381,6 +386,7 @@ class ThreadItem {
|
|||||||
'list_unseen_txt' => $list_unseen_txt,
|
'list_unseen_txt' => $list_unseen_txt,
|
||||||
'markseen' => t('Mark all seen'),
|
'markseen' => t('Mark all seen'),
|
||||||
'responses' => $responses,
|
'responses' => $responses,
|
||||||
|
'my_responses' => $my_responses,
|
||||||
'like_count' => $like_count,
|
'like_count' => $like_count,
|
||||||
'like_list' => $like_list,
|
'like_list' => $like_list,
|
||||||
'like_list_part' => $like_list_part,
|
'like_list_part' => $like_list_part,
|
||||||
|
@ -1053,6 +1053,9 @@ function builtin_activity_puller($item, &$conv_responses) {
|
|||||||
$conv_responses[$mode][$item['thr_parent']] ++;
|
$conv_responses[$mode][$item['thr_parent']] ++;
|
||||||
|
|
||||||
$conv_responses[$mode][$item['thr_parent'] . '-l'][] = $url;
|
$conv_responses[$mode][$item['thr_parent'] . '-l'][] = $url;
|
||||||
|
if(get_observer_hash() && get_observer_hash() === $item['author_xchan']) {
|
||||||
|
$conv_responses[$mode][$item['thr_parent'] . '-m'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
// there can only be one activity verb per item so if we found anything, we can stop looking
|
// there can only be one activity verb per item so if we found anything, we can stop looking
|
||||||
return;
|
return;
|
||||||
|
@ -340,3 +340,8 @@ img.smiley.emoji:hover {
|
|||||||
#filer_save {
|
#filer_save {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ivoted {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 120%;
|
||||||
|
}
|
@ -94,35 +94,35 @@
|
|||||||
<div class="btn-group dropdown">
|
<div class="btn-group dropdown">
|
||||||
{{if $item.like}}
|
{{if $item.like}}
|
||||||
<button type="button" title="{{$item.like.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'like'); return false;">
|
<button type="button" title="{{$item.like.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'like'); return false;">
|
||||||
<i class="fa fa-thumbs-o-up" ></i>
|
<i class="fa fa-thumbs-o-up{{if $item.my_responses.like}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.dislike}}
|
{{if $item.dislike}}
|
||||||
<button type="button" title="{{$item.dislike.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'dislike'); return false;">
|
<button type="button" title="{{$item.dislike.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'dislike'); return false;">
|
||||||
<i class="fa fa-thumbs-o-down" ></i>
|
<i class="fa fa-thumbs-o-down{{if $item.my_responses.dislike}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.isevent}}
|
{{if $item.isevent}}
|
||||||
<button type="button" title="{{$item.attend.0}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
|
<button type="button" title="{{$item.attend.0}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
|
||||||
<i class="fa fa-check" ></i>
|
<i class="fa fa-check{{if $item.my_responses.attend}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" title="{{$item.attend.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'attendno'); return false;">
|
<button type="button" title="{{$item.attend.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'attendno'); return false;">
|
||||||
<i class="fa fa-times" ></i>
|
<i class="fa fa-times{{if $item.my_responses.attendno}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" title="{{$item.attend.2}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
|
<button type="button" title="{{$item.attend.2}}" class="btn btn-default btn-sm" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendmaybe'); return false;">
|
||||||
<i class="fa fa-question" ></i>
|
<i class="fa fa-question{{if $item.my_responses.attendmaybe}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $item.canvote}}
|
{{if $item.canvote}}
|
||||||
<button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
|
<button type="button" title="{{$item.conlabels.0}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'agree'); return false;">
|
||||||
<i class="fa fa-check" ></i>
|
<i class="fa fa-check{{if $item.my_responses.agree}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
|
<button type="button" title="{{$item.conlabels.1}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'disagree'); return false;">
|
||||||
<i class="fa fa-times" ></i>
|
<i class="fa fa-times{{if $item.my_responses.disagree}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
|
<button type="button" title="{{$item.conlabels.2}}" class="btn btn-default btn-sm" onclick="dolike({{$item.id}},'abstain'); return false;">
|
||||||
<i class="fa fa-question" ></i>
|
<i class="fa fa-question{{if $item.my_responses.abstain}} ivoted{{/if}}" ></i>
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
|
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
|
||||||
|
Reference in New Issue
Block a user