Merge pull request #9891 from MrPetovan/task/9782-item-star
Move GET starred/{id} to POST item/{id}/star
This commit is contained in:
commit
ee6699e641
13 changed files with 64 additions and 43 deletions
|
@ -19,33 +19,38 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Friendica\Module;
|
namespace Friendica\Module\Item;
|
||||||
|
|
||||||
use Friendica\BaseModule;
|
use Friendica\BaseModule;
|
||||||
|
use Friendica\Core\Session;
|
||||||
|
use Friendica\Core\System;
|
||||||
use Friendica\DI;
|
use Friendica\DI;
|
||||||
use Friendica\Model\Item;
|
use Friendica\Model\Item;
|
||||||
use Friendica\Model\Post;
|
use Friendica\Model\Post;
|
||||||
|
use Friendica\Network\HTTPException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle starred items
|
* Toggle starred items
|
||||||
*/
|
*/
|
||||||
class Starred extends BaseModule
|
class Star extends BaseModule
|
||||||
{
|
{
|
||||||
public static function rawContent(array $parameters = [])
|
public static function rawContent(array $parameters = [])
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
$l10n = DI::l10n();
|
||||||
throw new \Friendica\Network\HTTPException\ForbiddenException();
|
|
||||||
|
if (!Session::isAuthenticated()) {
|
||||||
|
throw new HttpException\ForbiddenException($l10n->t('Access denied.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($parameters['item'])) {
|
if (empty($parameters['id'])) {
|
||||||
throw new \Friendica\Network\HTTPException\BadRequestException();
|
throw new HTTPException\BadRequestException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$itemId = intval($parameters['item']);
|
$itemId = intval($parameters['id']);
|
||||||
|
|
||||||
$item = Post::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $itemId]);
|
$item = Post::selectFirstForUser(local_user(), ['starred'], ['uid' => local_user(), 'id' => $itemId]);
|
||||||
if (empty($item)) {
|
if (empty($item)) {
|
||||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
throw new HTTPException\NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$starred = !(bool)$item['starred'];
|
$starred = !(bool)$item['starred'];
|
||||||
|
@ -53,14 +58,25 @@ class Starred extends BaseModule
|
||||||
Item::update(['starred' => $starred], ['id' => $itemId]);
|
Item::update(['starred' => $starred], ['id' => $itemId]);
|
||||||
|
|
||||||
// See if we've been passed a return path to redirect to
|
// See if we've been passed a return path to redirect to
|
||||||
$returnPath = $_REQUEST['return'] ?? '';
|
$return_path = $_REQUEST['return'] ?? '';
|
||||||
if (!empty($returnPath)) {
|
if (!empty($return_path)) {
|
||||||
$rand = '_=' . time() . (strpos($returnPath, '?') ? '&' : '?') . 'rand';
|
$rand = '_=' . time();
|
||||||
DI::baseUrl()->redirect($returnPath . $rand);
|
if (strpos($return_path, '?')) {
|
||||||
|
$rand = "&$rand";
|
||||||
|
} else {
|
||||||
|
$rand = "?$rand";
|
||||||
}
|
}
|
||||||
|
|
||||||
// the json doesn't really matter, it will either be 0 or 1
|
DI::baseUrl()->redirect($return_path . $rand);
|
||||||
echo json_encode((int)$starred);
|
}
|
||||||
exit();
|
|
||||||
|
$return = [
|
||||||
|
'status' => 'ok',
|
||||||
|
'item_id' => $itemId,
|
||||||
|
'verb' => 'star',
|
||||||
|
'state' => (int)$starred,
|
||||||
|
];
|
||||||
|
|
||||||
|
System::jsonExit($return);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -294,6 +294,7 @@ return [
|
||||||
'/{id:\d+}/activity/{verb}' => [Module\Item\Activity::class, [ R::POST]],
|
'/{id:\d+}/activity/{verb}' => [Module\Item\Activity::class, [ R::POST]],
|
||||||
'/{id:\d+}/ignore' => [Module\Item\Ignore::class, [ R::POST]],
|
'/{id:\d+}/ignore' => [Module\Item\Ignore::class, [ R::POST]],
|
||||||
'/{id:\d+}/pin' => [Module\Item\Pin::class, [ R::POST]],
|
'/{id:\d+}/pin' => [Module\Item\Pin::class, [ R::POST]],
|
||||||
|
'/{id:\d+}/star' => [Module\Item\Star::class, [ R::POST]],
|
||||||
],
|
],
|
||||||
|
|
||||||
'/localtime' => [Module\Debug\Localtime::class, [R::GET, R::POST]],
|
'/localtime' => [Module\Debug\Localtime::class, [R::GET, R::POST]],
|
||||||
|
@ -412,7 +413,6 @@ return [
|
||||||
'/rsd.xml' => [Module\ReallySimpleDiscovery::class, [R::GET]],
|
'/rsd.xml' => [Module\ReallySimpleDiscovery::class, [R::GET]],
|
||||||
'/smilies[/json]' => [Module\Smilies::class, [R::GET]],
|
'/smilies[/json]' => [Module\Smilies::class, [R::GET]],
|
||||||
'/statistics.json' => [Module\Statistics::class, [R::GET]],
|
'/statistics.json' => [Module\Statistics::class, [R::GET]],
|
||||||
'/starred/{item:\d+}' => [Module\Starred::class, [R::GET]],
|
|
||||||
'/toggle_mobile' => [Module\ToggleMobile::class, [R::GET]],
|
'/toggle_mobile' => [Module\ToggleMobile::class, [R::GET]],
|
||||||
'/tos' => [Module\Tos::class, [R::GET]],
|
'/tos' => [Module\Tos::class, [R::GET]],
|
||||||
|
|
||||||
|
|
|
@ -682,21 +682,26 @@ function dosubthread(ident) {
|
||||||
liking = 1;
|
liking = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function dostar(ident) {
|
function doStar(ident) {
|
||||||
ident = ident.toString();
|
ident = ident.toString();
|
||||||
$('#like-rotator-' + ident).show();
|
$('#like-rotator-' + ident).show();
|
||||||
$.get('starred/' + ident, function(data) {
|
$.post('item/' + ident + '/star')
|
||||||
if (data.match(/1/)) {
|
.then(function(data) {
|
||||||
$('#starred-' + ident).addClass('starred');
|
if (data.state === 1) {
|
||||||
$('#starred-' + ident).removeClass('unstarred');
|
$('#starred-' + ident)
|
||||||
|
.addClass('starred')
|
||||||
|
.removeClass('unstarred');
|
||||||
$('#star-' + ident).addClass('hidden');
|
$('#star-' + ident).addClass('hidden');
|
||||||
$('#unstar-' + ident).removeClass('hidden');
|
$('#unstar-' + ident).removeClass('hidden');
|
||||||
} else {
|
} else {
|
||||||
$('#starred-' + ident).addClass('unstarred');
|
$('#starred-' + ident)
|
||||||
$('#starred-' + ident).removeClass('starred');
|
.addClass('unstarred')
|
||||||
|
.removeClass('starred');
|
||||||
$('#star-' + ident).removeClass('hidden');
|
$('#star-' + ident).removeClass('hidden');
|
||||||
$('#unstar-' + ident).addClass('hidden');
|
$('#unstar-' + ident).addClass('hidden');
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.always(function () {
|
||||||
$('#like-rotator-' + ident).hide();
|
$('#like-rotator-' + ident).hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
<a href="#" id="pinned-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
<a href="#" id="pinned-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="starred-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
<a href="#" id="starred-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.tagger}}
|
{{if $item.tagger}}
|
||||||
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="tag-item icon tagged" title="{{$item.tagger.add}}"></a>
|
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="tag-item icon tagged" title="{{$item.tagger.add}}"></a>
|
||||||
|
|
|
@ -206,8 +206,8 @@
|
||||||
|
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="star-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
<a id="star-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
||||||
<a id="unstar-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
<a id="unstar-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -358,8 +358,8 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
|
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="star-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
<a id="star-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
||||||
<a id="unstar-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
<a id="unstar-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -523,8 +523,8 @@ as the value of $top_child_total (this is done at the end of this file)
|
||||||
|
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<li role="menuitem">
|
<li role="menuitem">
|
||||||
<a id="star-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
<a id="star-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classdo}}" title="{{$item.star.do}}"><i class="fa fa-star-o" aria-hidden="true"></i> {{$item.star.do}}</a>
|
||||||
<a id="unstar-{{$item.id}}" href="javascript:dostar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
<a id="unstar-{{$item.id}}" href="javascript:doStar({{$item.id}});" class="btn-link {{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="fa fa-star" aria-hidden="true"></i> {{$item.star.undo}}</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
|
|
||||||
<div class="wall-item-actions-social">
|
<div class="wall-item-actions-social">
|
||||||
{{if $star}}
|
{{if $star}}
|
||||||
<a href="#" id="star-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classdo}}" title="{{$star.do}}">{{$star.do}}</a>
|
<a href="#" id="star-{{$id}}" onclick="doStar({{$id}}); return false;" class="{{$star.classdo}}" title="{{$star.do}}">{{$star.do}}</a>
|
||||||
<a href="#" id="unstar-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classundo}}" title="{{$star.undo}}">{{$star.undo}}</a>
|
<a href="#" id="unstar-{{$id}}" onclick="doStar({{$id}}); return false;" class="{{$star.classundo}}" title="{{$star.undo}}">{{$star.undo}}</a>
|
||||||
<a href="#" id="tagger-{{$id}}" onclick="itemTag({{$id}}); return false;" class="{{$star.classtagger}}" title="{{$star.tagger}}">{{$star.tagger}}</a>
|
<a href="#" id="tagger-{{$id}}" onclick="itemTag({{$id}}); return false;" class="{{$star.classtagger}}" title="{{$star.tagger}}">{{$star.tagger}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
|
|
||||||
<div class="wall-item-actions-social">
|
<div class="wall-item-actions-social">
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
<a href="#" id="star-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
||||||
<a href="#" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}">{{$item.star.undo}}</a>
|
<a href="#" id="unstar-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}">{{$item.star.undo}}</a>
|
||||||
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.star.classtagger}}" title="{{$item.star.tagger}}">{{$item.star.tagger}}</a>
|
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.star.classtagger}}" title="{{$item.star.tagger}}">{{$item.star.tagger}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,8 @@
|
||||||
<a href="#" id="unpin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}">{{$item.pin.undo}}</a>
|
<a href="#" id="unpin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}">{{$item.pin.undo}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
<a href="#" id="star-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
||||||
<a href="#" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}">{{$item.star.undo}}</a>
|
<a href="#" id="unstar-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}">{{$item.star.undo}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.ignore}}
|
{{if $item.ignore}}
|
||||||
<a href="#" id="ignore-{{$item.id}}" onclick="doIgnoreThread({{$item.id}}); return false;" class="{{$item.ignore.classdo}}" title="{{$item.ignore.do}}">{{$item.ignore.do}}</a>
|
<a href="#" id="ignore-{{$item.id}}" onclick="doIgnoreThread({{$item.id}}); return false;" class="{{$item.ignore.classdo}}" title="{{$item.ignore.do}}">{{$item.ignore.do}}</a>
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
<a href="#" id="pinned-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
<a href="#" id="pinned-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="pin-item icon {{$item.ispinned}}" title="{{$item.pin.toggle}}"></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="starred-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
<a href="#" id="starred-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="star-item icon {{$item.isstarred}}" title="{{$item.star.toggle}}"></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.tagger}}
|
{{if $item.tagger}}
|
||||||
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="tag-item icon tagged" title="{{$item.tagger.add}}"></a>
|
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="tag-item icon tagged" title="{{$item.tagger.add}}"></a>
|
||||||
|
|
|
@ -40,8 +40,8 @@
|
||||||
|
|
||||||
<div class="wall-item-actions-social">
|
<div class="wall-item-actions-social">
|
||||||
{{if $star}}
|
{{if $star}}
|
||||||
<a href="#" id="star-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classdo}}" title="{{$star.do}}">{{$star.do}}</a>
|
<a href="#" id="star-{{$id}}" onclick="doStar({{$id}}); return false;" class="{{$star.classdo}}" title="{{$star.do}}">{{$star.do}}</a>
|
||||||
<a href="#" id="unstar-{{$id}}" onclick="dostar({{$id}}); return false;" class="{{$star.classundo}}" title="{{$star.undo}}">{{$star.undo}}</a>
|
<a href="#" id="unstar-{{$id}}" onclick="doStar({{$id}}); return false;" class="{{$star.classundo}}" title="{{$star.undo}}">{{$star.undo}}</a>
|
||||||
<a href="#" id="tagger-{{$id}}" onclick="itemTag({{$id}}); return false;" class="{{$star.classtagger}}" title="{{$star.tagger}}">{{$star.tagger}}</a>
|
<a href="#" id="tagger-{{$id}}" onclick="itemTag({{$id}}); return false;" class="{{$star.classtagger}}" title="{{$star.tagger}}">{{$star.tagger}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,8 @@
|
||||||
|
|
||||||
<div class="wall-item-actions-social">
|
<div class="wall-item-actions-social">
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
<a href="#" id="star-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}">{{$item.star.do}}</a>
|
||||||
<a href="#" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}">{{$item.star.undo}}</a>
|
<a href="#" id="unstar-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}">{{$item.star.undo}}</a>
|
||||||
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.star.classtagger}}" title="{{$item.star.tagger}}">{{$item.star.tagger}}</a>
|
<a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.star.classtagger}}" title="{{$item.star.tagger}}">{{$item.star.tagger}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -140,8 +140,8 @@
|
||||||
<a role="button" id="unpin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="icon-remove-circle icon-large"><span class="sr-only">{{$item.pin.undo}}</span></i></a>
|
<a role="button" id="unpin-{{$item.id}}" onclick="doPin({{$item.id}}); return false;" class="{{$item.pin.classundo}}" title="{{$item.pin.undo}}"><i class="icon-remove-circle icon-large"><span class="sr-only">{{$item.pin.undo}}</span></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.star}}
|
{{if $item.star}}
|
||||||
<a role="button" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}"><i class="icon-star icon-large"><span class="sr-only">{{$item.star.do}}</span></i></a>
|
<a role="button" id="star-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classdo}}" title="{{$item.star.do}}"><i class="icon-star icon-large"><span class="sr-only">{{$item.star.do}}</span></i></a>
|
||||||
<a role="button" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="icon-star-empty icon-large"><span class="sr-only">{{$item.star.undo}}</span></i></a>
|
<a role="button" id="unstar-{{$item.id}}" onclick="doStar({{$item.id}}); return false;" class="{{$item.star.classundo}}" title="{{$item.star.undo}}"><i class="icon-star-empty icon-large"><span class="sr-only">{{$item.star.undo}}</span></i></a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $item.ignore}}
|
{{if $item.ignore}}
|
||||||
<a role="button" id="ignore-{{$item.id}}" onclick="doIgnoreThread({{$item.id}}); return false;" class="{{$item.ignore.classdo}}" title="{{$item.ignore.do}}"><i class="icon-bell-slash icon-large"><span class="sr-only">{{$item.ignore.do}}</span></i></a>
|
<a role="button" id="ignore-{{$item.id}}" onclick="doIgnoreThread({{$item.id}}); return false;" class="{{$item.ignore.classdo}}" title="{{$item.ignore.do}}"><i class="icon-bell-slash icon-large"><span class="sr-only">{{$item.ignore.do}}</span></i></a>
|
||||||
|
|
Loading…
Reference in a new issue