summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-05 18:07:02 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-05 18:07:02 +0200
commit3921c654f8c5684eedd4bd081f8b94c1c7b207e5 (patch)
tree69db59c6cac9fef18f00982ef69d9b0ac737ffa2 /templates
parentc97bfffd728b0c2e75e39e3a21eda252324fe1e5 (diff)
add undo for feed deletion
Diffstat (limited to 'templates')
-rw-r--r--templates/part.listfeed.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php
index e0d00d093..55b6aa5c3 100644
--- a/templates/part.listfeed.php
+++ b/templates/part.listfeed.php
@@ -25,23 +25,33 @@
'progress-icon': !feed.id,
'problem-icon': feed.error
}"
- ng-if="!feed.editing"
+ ng-if="!feed.editing && !feed.deleted"
ng-href="#/items/feeds/{{ feed.id }}/"
class="title icon-loading"
title="{{ feed.title }}">
{{ feed.title }}
</a>
+ <div ng-show="feed.deleted" class="app-navigation-entry-deleted">
+ <div class="app-navigation-entry-deleted-description"><?php p($l->t('Deleted')); ?> {{ feed.title }}</div>
+ <button class="icon-history"
+ title="<?php p($l->t('Undo')); ?>"
+ ng-click="Navigation.undeleteFeed(feed)"></button>
+ <button class="icon-close"
+ title="<?php p($l->t('Remove notification')); ?>"
+ ng-click="Navigation.removeFeed(feed)"></button>
+ </div>
+
<div ng-if="feed.editing" class="app-navigation-entry-edit">
<input name="feedRename" type="text" value="{{ feed.title }}" news-auto-focus>
<button title="<?php p($l->t('Rename')); ?>"
- ng-click="Navigation.renameFeed(feed.id, feed.title)"
+ ng-click="Navigation.renameFeed(feed)"
class="action icon-checkmark">
</button>
</div>
<div class="app-navigation-entry-utils"
- ng-show="feed.id && !feed.editing && !feed.error">
+ ng-show="feed.id && !feed.editing && !feed.error && !feed.deleted">
<ul>
<li class="app-navigation-entry-utils-counter"
ng-show="feed.id && Navigation.getUnreadCount(feed.id) > 0">
@@ -58,7 +68,7 @@
<li><button ng-click="feed.editing=true"
class="icon-rename"
title="<?php p($l->t('Rename feed')); ?>"></button></li>
- <li><button ng-click="Navigation.deleteFeed(feed.url)"
+ <li><button ng-click="Navigation.deleteFeed(feed)"
class="icon-delete"
title="<?php p($l->t('Delete website')); ?>"></button></li>
<li><button ng-show="Navigation.getUnreadCount(feed.id) > 0"