summaryrefslogtreecommitdiffstats
path: root/templates/part.items.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/part.items.php')
-rw-r--r--templates/part.items.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/templates/part.items.php b/templates/part.items.php
index 49423236c..486741f19 100644
--- a/templates/part.items.php
+++ b/templates/part.items.php
@@ -1,9 +1,15 @@
<?php
-$feedid = isset($_['feedid']) ? $_['feedid'] : '';
+$feedId = isset($_['feedid']) ? $_['feedid'] : '';
-$itemmapper = new OCA\News\ItemMapper();
-$items = $itemmapper->findAll($feedid);
+$itemMapper = new OCA\News\ItemMapper();
+
+$showOnlyUnread = true; // FIXME: get this from the settings db
+if($showOnlyUnread){
+ $items = $itemMapper->findAllStatus($feedId, OCA\News\StatusFlag::Unread);
+} else {
+ $items = $itemMapper->findAll($feedId);
+}
echo '<ul>';
foreach($items as $item) {
@@ -22,7 +28,7 @@ foreach($items as $item) {
$startTitle = $l->t('Mark as important');
}
- echo '<li class="feed_item ' . $newsItemClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedid . '">';
+ echo '<li class="feed_item ' . $newsItemClass .'" data-id="' . $item->getId() . '" data-feedid="' . $feedId . '" data-processing="false">';
echo '<div class="utils">';
echo '<ul class="primary_item_utils">';