Add the number of unread items when reading an article

This commit is contained in:
Frédéric Guillot 2013-09-06 18:10:46 -04:00
parent a596472100
commit 95f5dd1257

View File

@ -100,6 +100,7 @@ Router\get_action('show', function() {
switch ($menu) {
case 'unread':
$nav = Model\get_nav_item($item);
$nb_unread_items = Model\count_items('unread');
break;
case 'history':
$nav = Model\get_nav_item($item, array('read'));
@ -113,6 +114,7 @@ Router\get_action('show', function() {
}
Response\html(Template\layout('show_item', array(
'nb_unread_items' => isset($nb_unread_items) ? $nb_unread_items : null,
'item' => $item,
'feed' => $feed,
'item_nav' => isset($nav) ? $nav : null,