mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add category suppress from latest
In the past we used suppress_from_homepage, it had mixed semantics it would remove from category list if category list was on home and unconditionally remove from latest. New setting explicitly only removes from latest list but leaves the category list alond
This commit is contained in:
@@ -97,7 +97,7 @@ const Category = RestModel.extend({
|
||||
allow_badges: this.get('allow_badges'),
|
||||
custom_fields: this.get('custom_fields'),
|
||||
topic_template: this.get('topic_template'),
|
||||
suppress_from_homepage: this.get('suppress_from_homepage'),
|
||||
suppress_from_latest: this.get('suppress_from_latest'),
|
||||
all_topics_wiki: this.get('all_topics_wiki'),
|
||||
allowed_tags: this.get('allowed_tags'),
|
||||
allowed_tag_groups: this.get('allowed_tag_groups'),
|
||||
|
||||
@@ -117,8 +117,8 @@ const TopicTrackingState = Discourse.Model.extend({
|
||||
}
|
||||
|
||||
if (filter === defaultHomepage()) {
|
||||
const suppressed_from_homepage_category_ids = Discourse.Site.currentProp("suppressed_from_homepage_category_ids");
|
||||
if (_.include(suppressed_from_homepage_category_ids, data.payload.category_id)) {
|
||||
const suppressed_from_latest_category_ids = Discourse.Site.currentProp("suppressed_from_latest_category_ids");
|
||||
if (_.include(suppressed_from_latest_category_ids, data.payload.category_id)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
<section class="field">
|
||||
<label>
|
||||
{{input type="checkbox" checked=category.suppress_from_homepage}}
|
||||
{{i18n "category.suppress_from_homepage"}}
|
||||
{{input type="checkbox" checked=category.suppress_from_latest}}
|
||||
{{i18n "category.suppress_from_latest"}}
|
||||
</label>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user