diff --git a/app/controllers/my_profile/profile_design_controller.rb b/app/controllers/my_profile/profile_design_controller.rb index 15fb0a9..1aceaa2 100644 --- a/app/controllers/my_profile/profile_design_controller.rb +++ b/app/controllers/my_profile/profile_design_controller.rb @@ -5,7 +5,7 @@ class ProfileDesignController < BoxOrganizerController protect 'edit_profile_design', :profile def available_blocks - blocks = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock ] + blocks = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock, ProductSearchBlock ] # blocks exclusive for organizations if profile.has_members? diff --git a/app/models/product_search_block.rb b/app/models/product_search_block.rb new file mode 100644 index 0000000..a5d9875 --- /dev/null +++ b/app/models/product_search_block.rb @@ -0,0 +1,15 @@ +class ProductSearchBlock < Block + + def self.description + _('A block to search products.') + end + + def self.title + _('Product search') + end + + def content + block_title(title) + end + +end diff --git a/test/unit/product_search_block_test.rb b/test/unit/product_search_block_test.rb new file mode 100644 index 0000000..9cb6ff7 --- /dev/null +++ b/test/unit/product_search_block_test.rb @@ -0,0 +1,15 @@ +require File.dirname(__FILE__) + '/../test_helper' + +class ProductSearchBlockTest < Test::Unit::TestCase + + should 'describe itself' do + assert_not_equal Block.description, ProductSearchBlock.description + end + + should 'titleize itself' do + assert_not_nil ProductSearchBlock.title + end + + should 'take block content' + +end -- libgit2 0.21.2