blob: b20cc52b9937e4e722b3e4651cfa47caef1e14a4 (
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
25
26
27
28
29
30
|
<?php
$l = new OC_l10n('news');
if(isset($_['mock'])){
$feedTitle = '';
$feedId = -1;
$unreadItemsCount = -1;
$favicon = OCP\Util::imagePath('core', 'actions/public.svg');
} else {
$feed = isset($_['feed']) ? $_['feed'] : null;
$feedTitle = htmlspecialchars_decode($feed->getTitle());
$feedId = $feed->getId();
$unreadItemsCount = isset($_['unreadItemsCount']) ? $_['unreadItemsCount'] : null;
$favicon = $feed->getFavicon();
if ($favicon == null) {
$favicon = OCP\Util::imagePath('core', 'actions/public.svg');
}
}
$mockClass = isset($_['mock']) ? 'mock' : '';
echo '<li class="feed ' . $mockClass . '" data-id="' . $feedId . '">';
echo '<a style="background-image: url(' . $favicon . ');" href="#" class="title">' . $feedTitle .'</a>';
echo '<span class="unread_items_counter">' . $unreadItemsCount . '</span>';
echo '<span class="buttons">';
echo '<button class="svg action feeds_delete" title="' . $l->t('Delete feed') . '"></button>';
echo '<button class="svg action feeds_markread" title="' . $l->t('Mark all read') . '"></button>';
echo '</span>';
echo '</li>';
|