diff --git a/app/controllers/admin/categories_controller.rb b/app/controllers/admin/categories_controller.rb index 9c5cac0..169860a 100644 --- a/app/controllers/admin/categories_controller.rb +++ b/app/controllers/admin/categories_controller.rb @@ -5,7 +5,9 @@ class CategoriesController < AdminController helper :categories def index - @categories = environment.top_level_categories + # WORKAROUND: restricting the category trees to display. Region and + # ProductCategory have VERY LARGE trees. + @categories = environment.categories.find(:all, :conditions => "parent_id is null AND type is null") end ALLOWED_TYPES = CategoriesHelper::TYPES.map {|item| item[1] } diff --git a/app/models/environment.rb b/app/models/environment.rb index 73d22b1..2d5d6d4 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -40,6 +40,9 @@ class Environment < ActiveRecord::Base 'disable_contact_person' => _('Disable contact for people'), 'disable_contact_community' => _('Disable contact for groups/communities'), 'disable_join_community_popup' => _('Disable the popup that ask to join a group/community'), + + 'enterprise_activation' => _('Enable activation of enterprises'), + 'warn_obsolete_browser' => _('Enable warning of obsolete browser'), } end diff --git a/app/views/home/index.rhtml b/app/views/home/index.rhtml index c764d74..ce18f30 100644 --- a/app/views/home/index.rhtml +++ b/app/views/home/index.rhtml @@ -1,4 +1,16 @@ -<%= @environment.description %> +<%= environment.description %> + +<% if environment.enabled?('enterprise_activation') %> + +
+ <% form_tag({:controller => 'account', :action => 'activation_question'}, {:method => 'get'}) do %> +

<%= __('Activate your enterprise') %>

+ <%= labelled_form_field(__('Enterprise activation code') + ':', text_field_tag('enterprise_code')) %> + <%= submit_button(:ok, _('Ativar')) %> + <% end %> +
+ +<% end %>