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