This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/controllers/discovery_top_controller.js
Régis Hanol 8214536614 BUGFIX: don't show redirect reason if you aren't redirected
Move the redirect to top page logic server-side and make sure the reason
is not shown when top is not in the navigation menu (top_menu).
2014-03-07 18:58:53 +01:00

24 lines
603 B
JavaScript

/**
The controller for discoverying 'Top' topics
@class DiscoveryTopController
@extends Discourse.Controller
@namespace Discourse
@module Discourse
**/
Discourse.DiscoveryTopController = Discourse.DiscoveryController.extend({
actions: {
refresh: function() {
var self = this;
this.send('loading');
Discourse.TopList.find().then(function(top_lists) {
self.set('model', top_lists);
self.send('loadingComplete');
});
}
},
hasDisplayedAllTopLists: Em.computed.and('content.yearly', 'content.monthly', 'content.weekly', 'content.daily')
});