summaryrefslogtreecommitdiffstats
path: root/templates/part.listfeed.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-31 01:12:20 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-31 01:12:20 +0200
commit82f0a877a001ead0bd0cdd76d96fe46a071535d8 (patch)
treea37f50a00c77c5e6afd1790ccde75ab3639c6c96 /templates/part.listfeed.php
parent32f2759945521129e00a7cd4933682ff63d9440f (diff)
add active and unread stuff
Diffstat (limited to 'templates/part.listfeed.php')
-rw-r--r--templates/part.listfeed.php38
1 files changed, 21 insertions, 17 deletions
diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php
index 96e0dafbc..fc9c24470 100644
--- a/templates/part.listfeed.php
+++ b/templates/part.listfeed.php
@@ -1,10 +1,13 @@
<li ng-class="{
- active: feedBusinessLayer.isActive(feed.id),
- unread: feedBusinessLayer.getUnreadCount(feed.id) > 0,
+ active: Navigation.isFeedActive(feed.id),
+ unread: Navigation.getFeedUnreadCount(feed.id) > 0,
failed: feed.error
}"
- ng-repeat="feed in .getFeedsOfFolder(<?php p($_['folderId']); ?>) | orderBy:'id':true"
- ng-show="feedBusinessLayer.isVisible(feed.id) || !feed.id"
+ ng-repeat="feed in Navigation.getFeedsOfFolder(<?php p($_['folderId']); ?>) | orderBy:'id':true"
+ ng-show="Navigation.getFeedUnreadCount(feed.id) > 0
+ || Navigation.isShowAll()
+ || Navigation.isFeedActive(feed.id)
+ || !feed.id"
data-id="{{ feed.id }}"
class="feed"
news-draggable="{
@@ -17,47 +20,47 @@
revert: true
}">
- <div ng-show="feed.editing" class="rename-feed">
+ <div ng-if="feed.editing" class="rename-feed">
<input type="text" ng-model="feed.title" autofocus>
<button title="<?php p($l->t('Cancel')); ?>"
- ng-click="cancel(feed)"
+ ng-click="cancelRenameFeed(feed.id)"
class="action-button back-button action"></button>
<button title="<?php p($l->t('Save')); ?>"
- ng-click="feedBusinessLayer.renameFeed(feed.id, feed.title)"
+ ng-click="Navigation.renameFeed(feed.id, feed.title)"
class="action-button create-button action">
</button>
</div>
<a ng-style="{ backgroundImage: feed.faviconLink }"
- ng-click="feedBusinessLayer.load(feed.id)"
ng-class="{
'progress-icon': !feed.id,
'problem-icon': feed.error
}"
ng-hide="feed.editing"
- href="#"
+ href="#/items/feeds/{{ feed.id }}"
class="title"
- title="{{ feed.title }}"
+ title="{{ feed.title }}">
{{ feed.title }}
</a>
<span class="utils">
- <button ng-click="feedBusinessLayer.delete(feed.id)"
+ <!--<button ng-click="Navigation.deleteFeed(feed.id)"
class="svg action delete-icon delete-button"
title="<?php p($l->t('Delete website')); ?>"
ng-show="feed.id && !feed.editing && !feed.error"
- oc-tooltip></button>
+ oc-tooltip></button>-->
<span class="unread-counter"
- ng-show="feed.id && feedBusinessLayer.getUnreadCount(feed.id) > 0 && !feed.error && !feed.editing">
- {{ unreadCountFormatter(feedBusinessLayer.getUnreadCount(feed.id)) }}
+ ng-show="feed.id && Navigation.getUnreadCount(feed.id) > 0 && !feed.error && !feed.editing">
+ {{ Navigation.getFeedUnreadCount(feed.id) | unreadCountFormatter }}
</span>
+ <!--
<button class="svg action mark-read-icon"
- ng-show="feedBusinessLayer.getUnreadCount(feed.id) > 0 && feed.id && !feed.error && !feed.editing"
- ng-click="feedBusinessLayer.markRead(feed.id)"
+ ng-show="Navigation.getUnreadCount(feed.id) > 0 && feed.id && !feed.error && !feed.editing"
+ ng-click="Navigation.markRead(feed.id)"
title="<?php p($l->t('Mark read')); ?>"
oc-tooltip></button>
@@ -69,10 +72,11 @@
oc-tooltip></button>
<button class="svg action delete-icon"
- ng-click="feedBusinessLayer.markErrorRead(feed.url)"
+ ng-click="Navigation.markErrorRead(feed.url)"
title="<?php p($l->t('Delete website')); ?>"
ng-show="feed.error"
oc-tooltip></button>
+ -->
</span>
<div class="message" ng-show="feed.error">{{ feed.error }}</div>