Add refresh link to the feed page items
This commit is contained in:
parent
04749a4aba
commit
5e0e079afa
@ -83,8 +83,11 @@ Router\get_action('remove-feed', function() {
|
||||
// Refresh one feed and redirect to unread items
|
||||
Router\get_action('refresh-feed', function() {
|
||||
|
||||
Model\Feed\refresh(Request\int_param('feed_id'));
|
||||
Response\redirect('?action=unread');
|
||||
$feed_id = Request\int_param('feed_id');
|
||||
$redirect = Request\param('redirect', 'unread');
|
||||
|
||||
Model\Feed\refresh($feed_id);
|
||||
Response\redirect('?action='.$redirect.'&feed_id='.$feed_id);
|
||||
});
|
||||
|
||||
// Ajax call to refresh one feed
|
||||
|
@ -7,6 +7,9 @@
|
||||
<div class="page-header">
|
||||
<h2><?= Helper\escape($feed['title']) ?><span id="page-counter"><?= isset($nb_items) ? $nb_items : '' ?></span></h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="?action=refresh-feed&feed_id=<?= $feed['id'] ?>&redirect=feed-items"><?= t('refresh') ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="?action=feed-items&feed_id=<?= $feed['id'] ?>&order=updated&direction=<?= $direction == 'asc' ? 'desc' : 'asc' ?>"><?= tne('sort by date<span class="hide-mobile"> (%s)</span>', $direction == 'desc' ? t('older first') : t('most recent first')) ?></a>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user