Feature: Hide plugins that ship with core from plugins panel

This commit is contained in:
Jeff Wong 2018-05-15 15:43:09 -07:00
parent c0a87f1fbf
commit 19605e8b0b
6 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@
# url: https://github.com/discourse/discourse/tree/master/plugins/discourse-details # url: https://github.com/discourse/discourse/tree/master/plugins/discourse-details
enabled_site_setting :details_enabled enabled_site_setting :details_enabled
hide_plugin if self.respond_to?(:hide_plugin)
register_asset "javascripts/details.js" register_asset "javascripts/details.js"
register_asset "stylesheets/details.scss" register_asset "stylesheets/details.scss"

View File

@ -2,6 +2,7 @@
# about: Display a date in your local timezone # about: Display a date in your local timezone
# version: 0.1 # version: 0.1
# author: Joffrey Jaffeux # author: Joffrey Jaffeux
hide_plugin if self.respond_to?(:hide_plugin)
register_asset "javascripts/discourse-local-dates.js" register_asset "javascripts/discourse-local-dates.js"
register_asset "stylesheets/discourse-local-dates.scss" register_asset "stylesheets/discourse-local-dates.scss"

View File

@ -5,6 +5,7 @@
# url: https://github.com/discourse/discourse/tree/master/plugins/discourse-narrative-bot # url: https://github.com/discourse/discourse/tree/master/plugins/discourse-narrative-bot
enabled_site_setting :discourse_narrative_bot_enabled enabled_site_setting :discourse_narrative_bot_enabled
hide_plugin if self.respond_to?(:hide_plugin)
if Rails.env == "development" if Rails.env == "development"
# workaround, teach reloader to reload jobs # workaround, teach reloader to reload jobs

View File

@ -5,6 +5,7 @@
enabled_site_setting :daily_performance_report enabled_site_setting :daily_performance_report
enabled_site_setting_filter "daily_performance_report" enabled_site_setting_filter "daily_performance_report"
hide_plugin if self.respond_to?(:hide_plugin)
after_initialize do after_initialize do
load File.expand_path("../app/jobs/scheduled/daily_performance_report.rb", __FILE__) load File.expand_path("../app/jobs/scheduled/daily_performance_report.rb", __FILE__)

View File

@ -5,6 +5,7 @@
# url: https://github.com/discourse/discourse/tree/master/plugins/discourse-presence # url: https://github.com/discourse/discourse/tree/master/plugins/discourse-presence
enabled_site_setting :presence_enabled enabled_site_setting :presence_enabled
hide_plugin if self.respond_to?(:hide_plugin)
register_asset 'stylesheets/presence.scss' register_asset 'stylesheets/presence.scss'

View File

@ -10,6 +10,7 @@ register_asset "stylesheets/desktop/poll.scss", :desktop
register_asset "stylesheets/mobile/poll.scss", :mobile register_asset "stylesheets/mobile/poll.scss", :mobile
enabled_site_setting :poll_enabled enabled_site_setting :poll_enabled
hide_plugin if self.respond_to?(:hide_plugin)
PLUGIN_NAME ||= "discourse_poll".freeze PLUGIN_NAME ||= "discourse_poll".freeze
DATA_PREFIX ||= "data-poll-".freeze DATA_PREFIX ||= "data-poll-".freeze