Commit 0f00757b950eec41892e2b2c83991640f0f5e202

Authored by JoenioCosta
1 parent a90b7543

ActionItem302: added block skel

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1838 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/my_profile/profile_design_controller.rb
... ... @@ -5,7 +5,7 @@ class ProfileDesignController < BoxOrganizerController
5 5 protect 'edit_profile_design', :profile
6 6  
7 7 def available_blocks
8   - blocks = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock ]
  8 + blocks = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock, ProductSearchBlock ]
9 9  
10 10 # blocks exclusive for organizations
11 11 if profile.has_members?
... ...
app/models/product_search_block.rb 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +class ProductSearchBlock < Block
  2 +
  3 + def self.description
  4 + _('A block to search products.')
  5 + end
  6 +
  7 + def self.title
  8 + _('Product search')
  9 + end
  10 +
  11 + def content
  12 + block_title(title)
  13 + end
  14 +
  15 +end
... ...
test/unit/product_search_block_test.rb 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +require File.dirname(__FILE__) + '/../test_helper'
  2 +
  3 +class ProductSearchBlockTest < Test::Unit::TestCase
  4 +
  5 + should 'describe itself' do
  6 + assert_not_equal Block.description, ProductSearchBlock.description
  7 + end
  8 +
  9 + should 'titleize itself' do
  10 + assert_not_nil ProductSearchBlock.title
  11 + end
  12 +
  13 + should 'take block content'
  14 +
  15 +end
... ...