From 87251fded7b7263e2787594e19983807f7edf381 Mon Sep 17 00:00:00 2001 From: Joe Buhlig Date: Sun, 18 Dec 2016 07:38:55 -0600 Subject: [PATCH] FEATURE: Category setting to make all topics wikis FEATURE: Category setting to make all topics wikis --- app/assets/javascripts/discourse/models/category.js.es6 | 1 + .../templates/components/edit-category-settings.hbs | 7 +++++++ app/controllers/categories_controller.rb | 1 + app/models/category.rb | 1 + app/serializers/category_serializer.rb | 1 + config/locales/client.en.yml | 1 + .../20161216101352_add_all_topics_wiki_to_categories.rb | 5 +++++ lib/import_export/category_exporter.rb | 2 +- lib/post_creator.rb | 3 +++ spec/components/post_creator_spec.rb | 8 ++++++++ 10 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20161216101352_add_all_topics_wiki_to_categories.rb diff --git a/app/assets/javascripts/discourse/models/category.js.es6 b/app/assets/javascripts/discourse/models/category.js.es6 index a8657ad16ab..73a0d3eee25 100644 --- a/app/assets/javascripts/discourse/models/category.js.es6 +++ b/app/assets/javascripts/discourse/models/category.js.es6 @@ -97,6 +97,7 @@ const Category = RestModel.extend({ custom_fields: this.get('custom_fields'), topic_template: this.get('topic_template'), suppress_from_homepage: this.get('suppress_from_homepage'), + all_topics_wiki: this.get('all_topics_wiki'), allowed_tags: this.get('allowed_tags'), allowed_tag_groups: this.get('allowed_tag_groups'), sort_order: this.get('sort_order'), diff --git a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs index 790e61e9390..8e5417271d2 100644 --- a/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs +++ b/app/assets/javascripts/discourse/templates/components/edit-category-settings.hbs @@ -19,6 +19,13 @@ +
+ +
+ {{#if siteSettings.topic_featured_link_enabled}}