FEATURE: category setting for mailinglist mirror
This commit is contained in:
parent
ddd4ddc020
commit
8f6d35aa59
|
@ -90,6 +90,7 @@ const Category = RestModel.extend({
|
|||
position: this.get('position'),
|
||||
email_in: this.get('email_in'),
|
||||
email_in_allow_strangers: this.get('email_in_allow_strangers'),
|
||||
mailinglist_mirror: this.get('mailinglist_mirror'),
|
||||
parent_category_id: this.get('parent_category_id'),
|
||||
uploaded_logo_id: this.get('uploaded_logo.id'),
|
||||
uploaded_background_id: this.get('uploaded_background.id'),
|
||||
|
|
|
@ -119,6 +119,13 @@
|
|||
</label>
|
||||
</section>
|
||||
|
||||
<section class='field'>
|
||||
<label>
|
||||
{{input type="checkbox" checked=category.mailinglist_mirror}}
|
||||
{{i18n 'category.mailinglist_mirror'}}
|
||||
</label>
|
||||
</section>
|
||||
|
||||
{{plugin-outlet name="category-email-in" args=(hash category=category)}}
|
||||
{{/if}}
|
||||
|
||||
|
|
|
@ -233,6 +233,7 @@ class CategoriesController < ApplicationController
|
|||
:position,
|
||||
:email_in,
|
||||
:email_in_allow_strangers,
|
||||
:mailinglist_mirror,
|
||||
:suppress_from_homepage,
|
||||
:all_topics_wiki,
|
||||
:parent_category_id,
|
||||
|
|
|
@ -555,6 +555,7 @@ end
|
|||
# default_view :string(50)
|
||||
# subcategory_list_style :string(50) default("rows_with_featured_topics")
|
||||
# default_top_period :string(20) default("all")
|
||||
# mailinglist_mirror :boolean default(FALSE), not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
|
|
|
@ -8,6 +8,7 @@ class CategorySerializer < BasicCategorySerializer
|
|||
:position,
|
||||
:email_in,
|
||||
:email_in_allow_strangers,
|
||||
:mailinglist_mirror,
|
||||
:suppress_from_homepage,
|
||||
:all_topics_wiki,
|
||||
:can_delete,
|
||||
|
|
|
@ -2122,6 +2122,7 @@ en:
|
|||
email_in_allow_strangers: "Accept emails from anonymous users with no accounts"
|
||||
email_in_disabled: "Posting new topics via email is disabled in the Site Settings. To enable posting new topics via email, "
|
||||
email_in_disabled_click: 'enable the "email in" setting.'
|
||||
mailinglist_mirror: "Category mirrors a mailinglist"
|
||||
suppress_from_homepage: "Suppress this category from the homepage."
|
||||
show_subcategory_list: "Show subcategory list above topics in this category."
|
||||
num_featured_topics: "Number of topics shown on the categories page:"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class AddMailinglistMirrorToCategories < ActiveRecord::Migration[5.1]
|
||||
def up
|
||||
add_column :categories, :mailinglist_mirror, :boolean, default: false, null: false
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :categories, :mailinglist_mirror
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue