summaryrefslogtreecommitdiffstats
path: root/templates/part.items.php
blob: ff372fafbedd4179173bfc7ccd24fe22e688fd9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php

$feedid = isset($_['feedid']) ? $_['feedid'] : '';

$itemmapper = new OCA\News\ItemMapper();
$items = $itemmapper->findAll($feedid);

echo '<div id="feed_items">';
echo '<ul>';
foreach($items as $item) {
	if($item->isRead()){
		$readClass = "title_read";
	} else {
		$readClass = "title_unread";
	}

	echo '<li class="news_item ' . $readClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedid . '">';
	echo '<h1 class="item_title"><a href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>';
	echo '<div class="body">' . $item->getBody() . '</div>';
	echo '</li>';

	}
echo '</ul>';
echo '</div>';