assign('folder', $collection); $tmpl_folder->assign('lastViewedFeedId', $lastViewedFeedId); $tmpl_folder->assign('lastViewedFeedType', $lastViewedFeedType); $tmpl_folder->printpage(); print_collection_list($collection->getChildren(), $lastViewedFeedId, $lastViewedFeedType); echo ''; } elseif ($collection instanceOf OCA\News\Feed) { //onhover $(element).attr('id', 'newID'); $itemmapper = new OCA\News\ItemMapper(); $items = $itemmapper->findByFeedId($collection->getId()); $counter = 0; foreach($items as $item) { if(!$item->isRead()) ++$counter; } $tmpl_feed = new OCP\Template("news", "part.listfeed"); $tmpl_feed->assign('feed', $collection); $tmpl_feed->assign('unreadItemsCount',$counter); $tmpl_feed->assign('lastViewedFeedId', $lastViewedFeedId); $tmpl_feed->assign('lastViewedFeedType', $lastViewedFeedType); $tmpl_feed->printpage(); } else { //TODO:handle error in this case } } } $allfeeds = isset($_['allfeeds']) ? $_['allfeeds'] : ''; $lastViewedFeedId = $_['lastViewedFeedId']; $lastViewedFeedType = $_['lastViewedFeedType']; $starredCount = $_['starredCount']; ?>