From 95f5dd1257729a7acc609d69c38e75331efd2050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Fri, 6 Sep 2013 18:10:46 -0400 Subject: [PATCH] Add the number of unread items when reading an article --- index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.php b/index.php index a9d506d..536839e 100644 --- a/index.php +++ b/index.php @@ -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,