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

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

$itemmapper = new OC_News_ItemMapper();

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

echo '<ul class="accordion">';
foreach($items as $item) {
	$title = $item->getTitle();
	echo '<li>';
	if ($item->isRead()) {
		echo '<div class="title_read">' . $title . '</div>';
	}
	else {
		echo '<div class="title_unread" onClick="News.Feed.markItem(' . $item->getId() .  ')">' . $title . '</div>';
	}
	echo '<div class="body">' . $item->getBody() . '</div></li>';
}
echo '</ul>';