mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: optional top level bookmarks tab
This commit is contained in:
parent
7d07ad4aa4
commit
ba186b25a7
5 changed files with 11 additions and 2 deletions
|
@ -819,6 +819,7 @@ en:
|
||||||
posted: "You haven't posted in any topics yet."
|
posted: "You haven't posted in any topics yet."
|
||||||
latest: "There are no latest topics. That's sad."
|
latest: "There are no latest topics. That's sad."
|
||||||
hot: "There are no hot topics."
|
hot: "There are no hot topics."
|
||||||
|
bookmarks: "You have no bookmarked topics yet."
|
||||||
category: "There are no {{category}} topics."
|
category: "There are no {{category}} topics."
|
||||||
top: "There are no top topics."
|
top: "There are no top topics."
|
||||||
educate:
|
educate:
|
||||||
|
@ -1465,6 +1466,9 @@ en:
|
||||||
posted:
|
posted:
|
||||||
title: "My Posts"
|
title: "My Posts"
|
||||||
help: "topics you have posted in"
|
help: "topics you have posted in"
|
||||||
|
bookmarks:
|
||||||
|
title: "Bookmarks"
|
||||||
|
help: "topics you have bookmarked"
|
||||||
category:
|
category:
|
||||||
title:
|
title:
|
||||||
zero: "{{categoryName}}"
|
zero: "{{categoryName}}"
|
||||||
|
|
|
@ -740,7 +740,7 @@ en:
|
||||||
enable_noscript_support: "Enable standard webcrawler search engine support via the noscript tag"
|
enable_noscript_support: "Enable standard webcrawler search engine support via the noscript tag"
|
||||||
allow_moderators_to_create_categories: "Allow moderators to create new categories"
|
allow_moderators_to_create_categories: "Allow moderators to create new categories"
|
||||||
cors_origins: "Allowed origins for cross-origin requests (CORS). Each origin must include http:// or https://. The DISCOURSE_ENABLE_CORS env variable must be set to true to enable CORS."
|
cors_origins: "Allowed origins for cross-origin requests (CORS). Each origin must include http:// or https://. The DISCOURSE_ENABLE_CORS env variable must be set to true to enable CORS."
|
||||||
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|new|unread|starred|categories|top|read|posted"
|
top_menu: "Determine which items appear in the homepage navigation, and in what order. Example latest|new|unread|categories|top|read|posted|bookmarks"
|
||||||
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
|
post_menu: "Determine which items appear on the post menu, and in what order. Example like|edit|flag|delete|share|bookmark|reply"
|
||||||
post_menu_hidden_items: "The menu items to hide by default in the post menu unless an expansion ellipsis is clicked on."
|
post_menu_hidden_items: "The menu items to hide by default in the post menu unless an expansion ellipsis is clicked on."
|
||||||
share_links: "Determine which items appear on the share dialog, and in what order."
|
share_links: "Determine which items appear on the share dialog, and in what order."
|
||||||
|
|
|
@ -92,6 +92,7 @@ basic:
|
||||||
- categories
|
- categories
|
||||||
- read
|
- read
|
||||||
- posted
|
- posted
|
||||||
|
- bookmarks
|
||||||
post_menu:
|
post_menu:
|
||||||
client: true
|
client: true
|
||||||
type: list
|
type: list
|
||||||
|
|
|
@ -56,7 +56,7 @@ module Discourse
|
||||||
class CSRF < Exception; end
|
class CSRF < Exception; end
|
||||||
|
|
||||||
def self.filters
|
def self.filters
|
||||||
@filters ||= [:latest, :unread, :new, :read, :posted]
|
@filters ||= [:latest, :unread, :new, :read, :posted, :bookmarks]
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.feed_filters
|
def self.feed_filters
|
||||||
|
|
|
@ -88,6 +88,10 @@ class TopicQuery
|
||||||
create_list(:posted) {|l| l.where('tu.posted') }
|
create_list(:posted) {|l| l.where('tu.posted') }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def list_bookmarks
|
||||||
|
create_list(:bookmarks) {|l| l.where('tu.bookmarked') }
|
||||||
|
end
|
||||||
|
|
||||||
def list_top_for(period)
|
def list_top_for(period)
|
||||||
score = "#{period}_score"
|
score = "#{period}_score"
|
||||||
create_list(:top, unordered: true) do |topics|
|
create_list(:top, unordered: true) do |topics|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue