clean up the topics footer so it does not flash and is localisable
This commit is contained in:
parent
ff0d58e4ee
commit
c81d07c44b
|
@ -39,6 +39,7 @@ Discourse.ListController = Ember.Controller.extend Discourse.Presence,
|
|||
Discourse.TopicList.list(current).then (items) =>
|
||||
@set('filterSummary', items.filter_summary)
|
||||
@set('filterMode', filterMode)
|
||||
@set('allLoaded', true) unless items.more_topics_url
|
||||
@set('loading', false)
|
||||
deferred.resolve(items)
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@ window.Discourse.FilteredListRoute = Discourse.Route.extend
|
|||
listController = @controllerFor('list')
|
||||
listController.set('canCreateTopic', false)
|
||||
listController.set('filterMode', '')
|
||||
listController.set('allLoaded', false)
|
||||
|
||||
|
||||
renderTemplate: ->
|
||||
@render 'listTopics', into: 'list', outlet: 'listView', controller: 'listTopics'
|
||||
setupController: ->
|
||||
|
|
|
@ -36,7 +36,9 @@
|
|||
|
||||
{{outlet listView}}
|
||||
|
||||
<h3>No more topics in this category. <a href="/categories">Browse all categories</a> or <a href="/">view popular topics</a></h3>
|
||||
{{#if controller.allLoaded}}
|
||||
{{{i18n topics.footer}}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -314,6 +314,7 @@ en:
|
|||
no_read: "You haven't read any topics yet."
|
||||
no_posted: "You haven't posted in any topics yet."
|
||||
no_popular: "There are no popular topics. That's sad."
|
||||
footer: "No more topics in this category. <a href=\"/categories\">Browse all categories</a> or <a href=\"/\">view popular topics</a>"
|
||||
|
||||
topic:
|
||||
create_in: 'Create {{categoryName}} Topic'
|
||||
|
|
Loading…
Reference in New Issue