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'),
|
position: this.get('position'),
|
||||||
email_in: this.get('email_in'),
|
email_in: this.get('email_in'),
|
||||||
email_in_allow_strangers: this.get('email_in_allow_strangers'),
|
email_in_allow_strangers: this.get('email_in_allow_strangers'),
|
||||||
|
mailinglist_mirror: this.get('mailinglist_mirror'),
|
||||||
parent_category_id: this.get('parent_category_id'),
|
parent_category_id: this.get('parent_category_id'),
|
||||||
uploaded_logo_id: this.get('uploaded_logo.id'),
|
uploaded_logo_id: this.get('uploaded_logo.id'),
|
||||||
uploaded_background_id: this.get('uploaded_background.id'),
|
uploaded_background_id: this.get('uploaded_background.id'),
|
||||||
|
|
|
@ -119,6 +119,13 @@
|
||||||
</label>
|
</label>
|
||||||
</section>
|
</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)}}
|
{{plugin-outlet name="category-email-in" args=(hash category=category)}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
|
@ -233,6 +233,7 @@ class CategoriesController < ApplicationController
|
||||||
:position,
|
:position,
|
||||||
:email_in,
|
:email_in,
|
||||||
:email_in_allow_strangers,
|
:email_in_allow_strangers,
|
||||||
|
:mailinglist_mirror,
|
||||||
:suppress_from_homepage,
|
:suppress_from_homepage,
|
||||||
:all_topics_wiki,
|
:all_topics_wiki,
|
||||||
:parent_category_id,
|
:parent_category_id,
|
||||||
|
|
|
@ -555,6 +555,7 @@ end
|
||||||
# default_view :string(50)
|
# default_view :string(50)
|
||||||
# subcategory_list_style :string(50) default("rows_with_featured_topics")
|
# subcategory_list_style :string(50) default("rows_with_featured_topics")
|
||||||
# default_top_period :string(20) default("all")
|
# default_top_period :string(20) default("all")
|
||||||
|
# mailinglist_mirror :boolean default(FALSE), not null
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
|
|
@ -8,6 +8,7 @@ class CategorySerializer < BasicCategorySerializer
|
||||||
:position,
|
:position,
|
||||||
:email_in,
|
:email_in,
|
||||||
:email_in_allow_strangers,
|
:email_in_allow_strangers,
|
||||||
|
:mailinglist_mirror,
|
||||||
:suppress_from_homepage,
|
:suppress_from_homepage,
|
||||||
:all_topics_wiki,
|
:all_topics_wiki,
|
||||||
:can_delete,
|
:can_delete,
|
||||||
|
|
|
@ -2122,6 +2122,7 @@ en:
|
||||||
email_in_allow_strangers: "Accept emails from anonymous users with no accounts"
|
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: "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.'
|
email_in_disabled_click: 'enable the "email in" setting.'
|
||||||
|
mailinglist_mirror: "Category mirrors a mailinglist"
|
||||||
suppress_from_homepage: "Suppress this category from the homepage."
|
suppress_from_homepage: "Suppress this category from the homepage."
|
||||||
show_subcategory_list: "Show subcategory list above topics in this category."
|
show_subcategory_list: "Show subcategory list above topics in this category."
|
||||||
num_featured_topics: "Number of topics shown on the categories page:"
|
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