diff --git a/app/controllers/admin/features_controller.rb b/app/controllers/admin/features_controller.rb index 4597fe3..c248c27 100644 --- a/app/controllers/admin/features_controller.rb +++ b/app/controllers/admin/features_controller.rb @@ -20,16 +20,11 @@ class FeaturesController < AdminController SlideshowBlock, ProfileSearchBlock, HighlightsBlock, - FriendsBlock, FavoriteEnterprisesBlock, CommunitiesBlock, EnterprisesBlock, - MembersBlock, DisabledEnterpriseMessageBlock, - ProductCategoriesBlock, - FeaturedProductsBlock, - FansBlock, - ProductsBlock ] + FansBlock ] @blocks += plugins.dispatch(:extra_blocks) @blocks.sort_by! { |block| block.name } diff --git a/app/models/environment.rb b/app/models/environment.rb index dbffd57..48556f4 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -15,7 +15,7 @@ class Environment < ApplicationRecord :members_whitelist, :highlighted_news_amount, :portal_news_amount, :date_format, :signup_intro, :enable_feed_proxy, :http_feed_proxy, :https_feed_proxy, - :disable_feed_ssl + :disable_feed_ssl, :disabled_blocks has_many :users @@ -338,6 +338,8 @@ class Environment < ApplicationRecord settings_items :enabled_plugins, :type => Array, :default => Noosfero::Plugin.available_plugin_names + settings_items :disabled_blocks, :type => Array, :default => [] + settings_items :search_hints, :type => Hash, :default => {} # Set to return http forbidden to host not on the allow origin list bellow @@ -413,6 +415,10 @@ class Environment < ApplicationRecord enabled_plugins.include?(plugin.to_s) end + def block_disabled?(block) + disabled_blocks.include?(block.to_s) + end + # enables the features identified by features, which is expected to # be an Enumarable object containing the identifiers of the desired features. # Passing nil is the same as passing an empty Array. diff --git a/app/views/features/manage_blocks.html.erb b/app/views/features/manage_blocks.html.erb index b1ea408..35cc8a0 100644 --- a/app/views/features/manage_blocks.html.erb +++ b/app/views/features/manage_blocks.html.erb @@ -62,7 +62,7 @@
- <% button_bar do %> + <%= button_bar do %> <%= submit_button('save', _('Save changes'), :id=>"save_blocks") %> <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %> <% end %> -- libgit2 0.21.2