summaryrefslogtreecommitdiffstats
path: root/templates/part.items.php
blob: 33bffc8ee267781f9ca4347b28dbcf8e6be98fb1 (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>';