$ignore_link = '';
if (local_user() && local_user() == $item['uid'] && $item['gravity'] == GRAVITY_PARENT && !$item['self']) {
- $sub_link = 'javascript:dosubthread(' . $item['id'] . '); return false;';
+ $sub_link = 'javascript:doFollowThread(' . $item['id'] . '); return false;';
}
$author = ['uid' => 0, 'id' => $item['author-id'],
update_item = ident.toString();
}
-function dosubthread(ident) {
+function doFollowThread(ident) {
unpause();
$('#like-rotator-' + ident.toString()).show();
- $.get('subthread/' + ident.toString(), NavUpdate);
+ $.post('item/' + ident.toString() + '/follow', NavUpdate);
liking = 1;
}
{{* Put additional actions in a dropdown menu *}}
- {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread || $item.ignore || $item.drop.dropping}}
+ {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping}}
<span role="presentation" class="separator"></span>
<span class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
<button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i> {{$item.menu}}</button>
</li>
{{/if}}
- {{if $item.subthread}}
+ {{if $item.follow_thread}}
<li role="menuitem">
- <a id="subthread-{{$item.id}}" href="javascript:{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.subthread.title}}</a>
+ <a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.follow_thread.title}}</a>
</li>
{{/if}}
</li>
{{/if}}
- {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread) && ($item.ignore || $item.drop.dropping)}}
+ {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || $item.drop.dropping)}}
<li role="separator" class="divider"></li>
{{/if}}
{{/if}}
{{* Put additional actions in a dropdown menu *}}
- {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread || $item.ignore || $item.drop.dropping}}
+ {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping}}
<span role="presentation" class="separator"></span>
<span class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
<button type="button" class="btn-link dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i> {{$item.menu}}</button>
</li>
{{/if}}
- {{if $item.subthread}}
+ {{if $item.follow_thread}}
<li role="menuitem">
- <a id="subthread-{{$item.id}}" href="javascript:{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.subthread.title}}</a>
+ <a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.follow_thread.title}}</a>
</li>
{{/if}}
</li>
{{/if}}
- {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread) && ($item.ignore || $item.drop.dropping)}}
+ {{if ($item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread) && ($item.ignore || $item.drop.dropping)}}
<li role="separator" class="divider"></li>
{{/if}}
</div>
{{/if}}
- {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.subthread || $item.ignore || $item.drop.dropping}}
+ {{if $item.edpost || $item.tagger || $item.filer || $item.pin || $item.star || $item.follow_thread || $item.ignore || $item.drop.dropping}}
<div class="more-links btn-group{{if $item.thread_level > 1}} dropup{{/if}}">
<button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown" id="dropdownMenuOptions-{{$item.id}}" aria-haspopup="true" aria-expanded="false" title="{{$item.menu}}"><i class="fa fa-ellipsis-h" aria-hidden="true"></i></button>
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenuOptions-{{$item.id}}">
</li>
{{/if}}
- {{if $item.subthread}}
+ {{if $item.follow_thread}}
<li role="menuitem">
- <a id="subthread-{{$item.id}}" href="javascript:{{$item.subthread.action}}" class="btn-link" title="{{$item.subthread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.subthread.title}}</a>
+ <a id="follow_thread-{{$item.id}}" href="javascript:{{$item.follow_thread.action}}" class="btn-link" title="{{$item.follow_thread.title}}"><i class="fa fa-plus" aria-hidden="true"></i> {{$item.follow_thread.title}}</a>
</li>
{{/if}}
*/
function frio_display_item(App $a, &$arr)
{
- // Add subthread to the item menu
- $subthread = [];
+ // Add follow to the item menu
+ $followThread = [];
if (
local_user()
&& local_user() == $arr['item']['uid']
&& $arr['item']['gravity'] == GRAVITY_PARENT
&& !$arr['item']['self'])
{
- $subthread = [
+ $followThread = [
'menu' => 'follow_thread',
'title' => DI::l10n()->t('Follow Thread'),
- 'action' => 'dosubthread(' . $arr['item']['id'] . ');',
+ 'action' => 'doFollowThread(' . $arr['item']['id'] . ');',
'href' => '#'
];
}
- $arr['output']['subthread'] = $subthread;
+ $arr['output']['follow_thread'] = $followThread;
}