Revert "FEATURE: category setting for default list filter."

This reverts commit 6f03d14c23.
This commit is contained in:
Vinoth Kannan 2020-05-30 20:53:53 +05:30
parent 93bd1ff228
commit e1af91f5ae
5 changed files with 1 additions and 33 deletions

View File

@ -68,13 +68,6 @@ export default buildCategoryPanel("settings", {
);
},
@discourseComputed
availableListFilters() {
return ["all", "none"].map(p => {
return { name: I18n.t(`category.list_filters.${p}`), value: p };
});
},
@discourseComputed
searchPrioritiesOptions() {
const options = [];

View File

@ -187,8 +187,7 @@ const Category = RestModel.extend({
),
search_priority: this.search_priority,
reviewable_by_group_name: this.reviewable_by_group_name,
read_only_banner: this.read_only_banner,
default_list_filter: this.default_list_filter
read_only_banner: this.read_only_banner
},
type: id ? "PUT" : "POST"
});

View File

@ -196,22 +196,6 @@
{{/unless}}
</div>
</section>
<section class="field">
<label for="category-default-filter">
{{i18n "category.default_list_filter"}}
</label>
<div class="controls">
{{combo-box
id="category-default-filter"
valueProperty="value"
content=availableListFilters
value=category.default_list_filter
none="category.list_filters.all"
}}
</div>
</section>
{{#if isParentCategory}}
<section class="field show-subcategory-list-field">
<label>

View File

@ -329,7 +329,6 @@ class CategoriesController < ApplicationController
:required_tag_group_name,
:min_tags_from_required_group,
:read_only_banner,
:default_list_filter,
custom_fields: [params[:custom_fields].try(:keys)],
permissions: [*p.try(:keys)],
allowed_tags: [],

View File

@ -1,7 +0,0 @@
# frozen_string_literal: true
class AddDefaultListFilterToCategories < ActiveRecord::Migration[6.0]
def change
add_column :categories, :default_list_filter, :string, limit: 20, default: 'all'
end
end