2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-09 22:22:54 +08:00

FEATURE: Improving bookmarks part 2 -- Topic Bookmarking (#8954)

### UI Changes

If `SiteSetting.enable_bookmarks_with_reminders` is enabled:

* Clicking "Bookmark" on a topic will create a new Bookmark record instead of a post + user action
* Clicking "Clear Bookmarks" on a topic will delete all the new Bookmark records on a topic
* The topic bookmark buttons control the post bookmark flags correctly and vice-versa
Disabled selecting the "reminder type" for bookmarks in the UI because the backend functionality is not done yet (of sending users notifications etc.)

### Other Changes

* Added delete bookmark route (but no UI yet)
* Added a rake task to sync the old PostAction bookmarks to the new Bookmark table, which can be run as many times as we want for a site (it will not create duplicates).
This commit is contained in:
Martin Brennan 2020-02-13 16:26:02 +10:00 committed by GitHub
parent e7c4ebc6d5
commit e1e74abd4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 342 additions and 26 deletions

View file

@ -3,6 +3,7 @@
require 'guardian/category_guardian'
require 'guardian/ensure_magic'
require 'guardian/post_guardian'
require 'guardian/bookmark_guardian'
require 'guardian/topic_guardian'
require 'guardian/user_guardian'
require 'guardian/post_revision_guardian'
@ -14,6 +15,7 @@ class Guardian
include EnsureMagic
include CategoryGuardian
include PostGuardian
include BookmarkGuardian
include TopicGuardian
include UserGuardian
include PostRevisionGuardian