summaryrefslogtreecommitdiffstats
path: root/templates/part.listfeed.php
blob: 530ab3ba808f77b907156b7f780759b529770dc0 (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');

$child = isset($_['child']) ? $_['child'] : null;
$unreadItems = isset($_['unreadItems']) ? $_['unreadItems'] : null;
$favicon = $child->getFavicon();
if ($favicon == null) {
        $favicon = OCP\Util::imagePath('news', 'rss.svg');
}

echo '<li class="feed" data-id="' . $child->getId() . '">';
echo '<a href="#" style="background: url(' . $favicon . ') left center no-repeat; background-size:16px 16px;" class="' . 
      (($unreadItems > 0) ? 'nonzero' : 'zero') . '">' . $child->getTitle() .'</a>';
if ($unreadItems > 0) {
	echo '<span class="unreaditemcounter nonzero">' . $unreadItems . '</span>';
}
else {
	echo '<span class="unreaditemcounter zero"></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(' . $child->getId(). '))" title="' . $l->t('Delete feed') . '"></button>';
echo '</li>';