summaryrefslogtreecommitdiffstats
path: root/templates/part.listfeed.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-14 15:49:49 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-14 15:49:49 +0200
commit0c73f5cf321274e7f99f2ed86cb60c2c6a6a1451 (patch)
tree23d24ff6cae290ca208d2c7a60344973245b45c6 /templates/part.listfeed.php
parentc072cc7ff8aa06a84b5f17f2a8f648649b4ae397 (diff)
Dont issue more post request on read than necesarry, make show only new items the default database settings still need to be written though, simplified and cleaned up the feedlist code, html and css
Diffstat (limited to 'templates/part.listfeed.php')
-rw-r--r--templates/part.listfeed.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php
index 0fba399ec..7d5c91afd 100644
--- a/templates/part.listfeed.php
+++ b/templates/part.listfeed.php
@@ -4,20 +4,21 @@ $l = new OC_l10n('news');
$feed = isset($_['feed']) ? $_['feed'] : null;
$unreadItems = isset($_['unreadItems']) ? $_['unreadItems'] : null;
+
$favicon = $feed->getFavicon();
if ($favicon == null) {
- $favicon = OCP\Util::imagePath('news', 'rss.svg');
+ $favicon = OCP\Util::imagePath('news', 'rss.svg');
}
-echo '<li class="feed" data-id="' . $feed->getId() . '">';
-echo '<a href="#" style="background: url(' . $favicon . ') left center no-repeat; background-size:16px 16px;" class="' .
- (($unreadItems > 0) ? 'nonzero' : 'zero') . '">' . $feed->getTitle() .'</a>';
-if ($unreadItems > 0) {
- echo '<span class="unreaditemcounter nonzero">' . $unreadItems . '</span>';
-}
-else {
- echo '<span class="unreaditemcounter zero"></span>';
+if($unreadItems == 0){
+ $allReadClass = 'all_read';
+} else {
+ $allReadClass = '';
}
+
+echo '<li class="feed" data-id="' . $feed->getId() . '">';
+echo '<a href="#" style="background: url(' . $favicon . ') left center no-repeat; background-size:16px 16px;" class="' . $allReadClass . '">' . $feed->getTitle() .'</a>';
+ echo '<span class="unreaditemcounter ' . $allReadClass . '">' . $unreadItems . '</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>';