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

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

$itemmapper = new OC_News_ItemMapper();

$items = $itemmapper->findAll($feedid);

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><a href="' . $item->getUrl() . '">' . $item->getTitle() . '</a></h1>';
	echo '<div class="body">' . $item->getBody() . '</div>';
	echo '</li>';

	}
echo '</ul>';