From 8df69dba83d733038dfb2afe46146875538a5f3a Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 27 Apr 2016 13:57:10 +0800 Subject: [PATCH] UX: Always show button to mark notifications as read. --- .../controllers/user-notifications.js.es6 | 2 -- .../templates/user/notifications-index.hbs | 16 ++++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 index e39d9a67c57..b61c7d45f6f 100644 --- a/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-notifications.js.es6 @@ -5,8 +5,6 @@ export default Ember.ArrayController.extend({ this.set("controllers.application.showFooter", !this.get("model.canLoadMore")); }.observes("model.canLoadMore"), - showDismissButton: Ember.computed.gt('user.total_unread_notifications', 0), - currentPath: Em.computed.alias('controllers.application.currentPath'), actions: { diff --git a/app/assets/javascripts/discourse/templates/user/notifications-index.hbs b/app/assets/javascripts/discourse/templates/user/notifications-index.hbs index 5d2e184b819..0ea5830ad6e 100644 --- a/app/assets/javascripts/discourse/templates/user/notifications-index.hbs +++ b/app/assets/javascripts/discourse/templates/user/notifications-index.hbs @@ -8,20 +8,16 @@ {{/if}} -{{#if showDismissButton}} -
- -
-{{/if}} +
+ +
{{user-notifications-large notifications=model}} {{#conditional-loading-spinner condition=loading}} {{#unless model.canLoadMore}} - {{#if showDismissButton}} -
- -
- {{/if}} +
+ +
{{/unless}} {{/conditional-loading-spinner}}