From eb814e682bdb932f71529f4d36644c9bb0c6474e Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Thu, 11 Jan 2018 22:41:44 +0100 Subject: Allow favorite in reading mode (#1761) I've got the inspiration from the mark as read action. So I've used the id of the feed to trigger the action and not the url in the link. This way, it works all the time. It works in reading mode, it works in normal mode when icon are not displayed. See #1545 --- app/views/index/reader.phtml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'app/views/index/reader.phtml') diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index f2af75af0..eb6613b28 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -18,11 +18,25 @@ if (!empty($this->entries)) { categories, $item->feed()); //We most likely already have the feed object in cache if (empty($feed)) $feed = $item->feed(true); + $favoriteUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id())); + if ($item->isFavorite()) { + $favoriteUrl['params']['is_favorite'] = 0; + } + $readUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id())); + if ($item->isRead()) { + $readUrl['params']['is_read'] = 0; + } ?> - + + isRead() ? 'read' : 'unread'); ?> + + + isFavorite() ? 'starred' : 'non-starred'); ?> + + ✇ name(); ?> -

title(); ?>

+

title(); ?>

author(); -- cgit v1.2.3