Commit efcb99700185b5c9e14cb29fc4a4834d9462a540

Authored by Victor Costa
1 parent db0dabfe

Pretty name for some blocks

app/models/featured_products_block.rb
... ... @@ -20,6 +20,10 @@ class FeaturedProductsBlock < Block
20 20 _('Featured Products')
21 21 end
22 22  
  23 + def self.pretty_name
  24 + _('Featured Products')
  25 + end
  26 +
23 27 def products
24 28 Product.find(self.product_ids) || []
25 29 end
... ...
app/models/feed_reader_block.rb
... ... @@ -40,6 +40,10 @@ class FeedReaderBlock < Block
40 40 _('Feed reader')
41 41 end
42 42  
  43 + def self.pretty_name
  44 + _('Feed Reader')
  45 + end
  46 +
43 47 def help
44 48 _('This block can be used to list the latest new from any site you want. You just need to inform the address of a RSS feed.')
45 49 end
... ...
app/models/link_list_block.rb
... ... @@ -55,6 +55,10 @@ class LinkListBlock < Block
55 55 _('This block can be used to create a menu of links. You can add, remove and update the links as you wish.')
56 56 end
57 57  
  58 + def self.pretty_name
  59 + _('Link list')
  60 + end
  61 +
58 62 def content(args={})
59 63 block_title(title) +
60 64 content_tag('ul',
... ...
app/models/raw_html_block.rb
... ... @@ -4,6 +4,10 @@ class RawHTMLBlock < Block
4 4 _('Raw HTML')
5 5 end
6 6  
  7 + def self.pretty_name
  8 + _('Raw HTML')
  9 + end
  10 +
7 11 settings_items :html, :type => :text
8 12  
9 13 attr_accessible :html
... ...
app/models/sellers_search_block.rb
... ... @@ -10,6 +10,10 @@ class SellersSearchBlock < Block
10 10 _('Products/Enterprises search')
11 11 end
12 12  
  13 + def self.pretty_name
  14 + _('Sellers Search')
  15 + end
  16 +
13 17 def default_title
14 18 _('Search for sellers')
15 19 end
... ...
plugins/community_track/lib/community_track_plugin/track_card_list_block.rb
... ... @@ -8,6 +8,10 @@ class CommunityTrackPlugin::TrackCardListBlock < CommunityTrackPlugin::TrackList
8 8 _('This block displays a list of most relevant tracks as cards.')
9 9 end
10 10  
  11 + def self.pretty_name
  12 + _('Track Card List')
  13 + end
  14 +
11 15 def track_partial
12 16 'track_card'
13 17 end
... ...
plugins/community_track/lib/community_track_plugin/track_list_block.rb
... ... @@ -14,6 +14,10 @@ class CommunityTrackPlugin::TrackListBlock < Block
14 14 _('This block displays a list of most relevant tracks.')
15 15 end
16 16  
  17 + def self.pretty_name
  18 + _('Track List')
  19 + end
  20 +
17 21 def track_partial
18 22 'track'
19 23 end
... ...