summaryrefslogtreecommitdiffstats
path: root/templates/part.items.php
blob: 24ca958e98b3bcd2d3d09b9c7e2df383b5d17f8b (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 class="accordion">';
foreach($items as $item) {
	$title = $item->getTitle();
	echo '<li>';
	echo '<div data-id="' . $item->getId() . '"';
	if ($item->isRead()) {
		echo ' class="title_read">';
	}
	else {
		echo ' class="title_unread" onClick="News.Feed.markItem(' . $item->getId() . ')">';
	}
	echo $title . '</div><div class="body">' . $item->getBody() . '</div>';
	echo '</li>';
}
echo '</ul>';