parent
aaaafb263b
commit
6301e46444
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
// Display history page
|
// Display history page
|
||||||
Router\get_action('history', function () {
|
Router\get_action('history', function () {
|
||||||
|
$order = Request\param('order', 'updated');
|
||||||
|
$direction = Request\param('direction', Model\Config\get('items_sorting_direction'));
|
||||||
$offset = Request\int_param('offset', 0);
|
$offset = Request\int_param('offset', 0);
|
||||||
$group_id = Request\int_param('group_id', null);
|
$group_id = Request\int_param('group_id', null);
|
||||||
$feed_ids = array();
|
$feed_ids = array();
|
||||||
@ -15,8 +17,8 @@ Router\get_action('history', function () {
|
|||||||
$feed_ids,
|
$feed_ids,
|
||||||
$offset,
|
$offset,
|
||||||
Model\Config\get('items_per_page'),
|
Model\Config\get('items_per_page'),
|
||||||
'updated',
|
$order,
|
||||||
Model\Config\get('items_sorting_direction')
|
$direction
|
||||||
);
|
);
|
||||||
|
|
||||||
$nb_items = Model\Item\count_by_status('read', $feed_ids);
|
$nb_items = Model\Item\count_by_status('read', $feed_ids);
|
||||||
@ -25,8 +27,8 @@ Router\get_action('history', function () {
|
|||||||
'favicons' => Model\Favicon\get_item_favicons($items),
|
'favicons' => Model\Favicon\get_item_favicons($items),
|
||||||
'original_marks_read' => Model\Config\get('original_marks_read'),
|
'original_marks_read' => Model\Config\get('original_marks_read'),
|
||||||
'items' => $items,
|
'items' => $items,
|
||||||
'order' => '',
|
'order' => $order,
|
||||||
'direction' => '',
|
'direction' => $direction,
|
||||||
'display_mode' => Model\Config\get('items_display_mode'),
|
'display_mode' => Model\Config\get('items_display_mode'),
|
||||||
'item_title_link' => Model\Config\get('item_title_link'),
|
'item_title_link' => Model\Config\get('item_title_link'),
|
||||||
'group_id' => $group_id,
|
'group_id' => $group_id,
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="?action=history<?= is_null($group_id) ? '' : '&group_id='.$group_id ?>&order=updated&direction=<?= $direction == 'asc' ? 'desc' : 'asc' ?>"><?= tne('sort by date %s(%s)%s', '<span class="hide-mobile">', $direction == 'desc' ? t('older first') : t('most recent first'), '</span>') ?></a>
|
||||||
|
</li>
|
||||||
<li><a href="?action=confirm-flush-history<?= is_null($group_id) ? '' : '&group_id='.$group_id ?>"><?= t('flush all items') ?></a></li>
|
<li><a href="?action=confirm-flush-history<?= is_null($group_id) ? '' : '&group_id='.$group_id ?>"><?= t('flush all items') ?></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user