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

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