summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-15 15:55:54 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-15 15:55:54 +0200
commit608ed2deb12504596f8556be47292620f1985fc8 (patch)
tree53b225eb20c15f6ce943d20ef76f2b011931cb9e /templates
parent58716d325c235d4ae8101c13d7936da643cb8ccf (diff)
parent04497e9e68516537244c359a06f29aa6b2afce08 (diff)
Merge branch 'newsapp' of git://gitorious.org/owncloud/apps into newsapp
Diffstat (limited to 'templates')
-rw-r--r--templates/part.items.php2
-rw-r--r--templates/part.listfeed.php6
-rw-r--r--templates/test.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/templates/part.items.php b/templates/part.items.php
index afac3e10a..399274e30 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -6,7 +6,7 @@ $itemMapper = new OCA\News\ItemMapper();
$showOnlyUnread = true; // FIXME: get this from the settings db
if($showOnlyUnread){
- $items = $itemMapper->findAllStatus($feedId, OCA\News\StatusFlag::Unread);
+ $items = $itemMapper->findAllStatus($feedId, OCA\News\StatusFlag::UNREAD);
} else {
$items = $itemMapper->findAll($feedId);
}
diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php
index 7d5c91afd..8b64a3846 100644
--- a/templates/part.listfeed.php
+++ b/templates/part.listfeed.php
@@ -3,14 +3,14 @@
$l = new OC_l10n('news');
$feed = isset($_['feed']) ? $_['feed'] : null;
-$unreadItems = isset($_['unreadItems']) ? $_['unreadItems'] : null;
+$unreadItemsCount = isset($_['unreadItemsCount']) ? $_['unreadItemsCount'] : null;
$favicon = $feed->getFavicon();
if ($favicon == null) {
$favicon = OCP\Util::imagePath('news', 'rss.svg');
}
-if($unreadItems == 0){
+if($unreadItemsCount == 0){
$allReadClass = 'all_read';
} else {
$allReadClass = '';
@@ -18,7 +18,7 @@ if($unreadItems == 0){
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 '<span class="unreaditemcounter ' . $allReadClass . '">' . $unreadItemsCount . '</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>';
diff --git a/templates/test.php b/templates/test.php
index 35a1019ed..3ef18c954 100644
--- a/templates/test.php
+++ b/templates/test.php
@@ -2,7 +2,7 @@
$itemmapper = new OCA\News\ItemMapper();
-$items = $itemmapper->findAllStatus(155, OCA\News\StatusFlag::Unread);
+$items = $itemmapper->findAllStatus(155, OCA\News\StatusFlag::UNREAD);
foreach ($items as $item) {
echo $item->getTitle();