summaryrefslogtreecommitdiffstats
path: root/templates/part.listfeed.php
blob: 0d343d3a98e030f35822b4cc267d23e631b19278 (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('core', 'actions/public.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 . '">' . htmlspecialchars_decode($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>';