mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 20:26:35 +08:00
129617b415
BUGFIX: navigation bar should always activate the right tab (even when diging into a top period) BUGFIX: /top pages titles BUGFIX: no "edit category" button on /top page after visiting a category BUGFIX: properly hide category columns when there is no children category (on both filter + top pages) BUGFIX: promises not caught when scrolling down a topic list to load more of them BUGFIX: CSS on category dropdowns Updated `top_menu` i18n with available filters
19 lines
332 B
Ruby
19 lines
332 B
Ruby
class TopListSerializer < ApplicationSerializer
|
|
|
|
attribute :can_create_topic
|
|
|
|
def can_create_topic
|
|
scope.can_create?(Topic)
|
|
end
|
|
|
|
TopTopic.periods.each do |period|
|
|
attribute period
|
|
|
|
define_method(period) do
|
|
TopicListSerializer.new(object[period], scope: scope).as_json if object[period]
|
|
end
|
|
|
|
end
|
|
|
|
end
|