summaryrefslogtreecommitdiffstats
path: root/templates/part.listfeed.php
blob: d3008bc918531331354541ceab4a4eef0a06398f (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

$l = new OC_l10n('news');

$feed = isset($_['feed']) ? $_['feed'] : null;
$unreadItemsCount = isset($_['unreadItemsCount']) ? $_['unreadItemsCount'] : null;

$favicon = $feed->getFavicon();
if ($favicon == null) {
    $favicon = OCP\Util::imagePath('news', 'rss.svg');
}

if($unreadItemsCount == 0){
    $allReadClass = 'all_read';
} else {
    $allReadClass = '';
}

echo '<li class="feed" data-id="' . $feed->getId() . '">';
echo '<a href="#" style="background-image: url(' . $favicon . '); " class="' . $allReadClass . '">' . $feed->getTitle() .'</a>';
	echo '<span class="unreaditemcounter ' . $allReadClass . '">' . $unreadItemsCount . '</span>';
echo '<button class="svg action feeds_edit" title="' . $l->t('Edit feed') . '"></button>';
echo '<button class="svg action feeds_delete" onClick="(News.Feed.delete(' . $feed->getId(). '))" title="' . $l->t('Delete feed') . '"></button>';
echo '</li>';