UX: Always show button to mark notifications as read.

This commit is contained in:
Guo Xiang Tan 2016-04-27 13:57:10 +08:00
parent 9fdea6cd46
commit 8df69dba83
No known key found for this signature in database
GPG Key ID: 19C321C8952B0F72
2 changed files with 6 additions and 12 deletions

View File

@ -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: {

View File

@ -8,20 +8,16 @@
</div>
{{/if}}
{{#if showDismissButton}}
<div class='notification-buttons'>
<button title="{{i18n 'user.dismiss_notifications_tooltip'}}" id='dismiss-notifications-top' class='btn notifications-read' {{action "resetNew"}}>{{i18n 'user.dismiss_notifications'}}</button>
</div>
{{/if}}
<div class='notification-buttons'>
<button title="{{i18n 'user.dismiss_notifications_tooltip'}}" id='dismiss-notifications-top' class='btn notifications-read' {{action "resetNew"}}>{{i18n 'user.dismiss_notifications'}}</button>
</div>
{{user-notifications-large notifications=model}}
{{#conditional-loading-spinner condition=loading}}
{{#unless model.canLoadMore}}
{{#if showDismissButton}}
<div class='notification-buttons'>
<button title="{{i18n 'user.dismiss_notifications_tooltip'}}" id='dismiss-notifications' class='btn notifications-read' {{action "resetNew"}}>{{i18n 'user.dismiss_notifications'}}</button>
</div>
{{/if}}
<div class='notification-buttons'>
<button title="{{i18n 'user.dismiss_notifications_tooltip'}}" id='dismiss-notifications' class='btn notifications-read' {{action "resetNew"}}>{{i18n 'user.dismiss_notifications'}}</button>
</div>
{{/unless}}
{{/conditional-loading-spinner}}