Commit bdec164132c26d32d0f489f16cbfe0237de709ef

Authored by Antonio Terceiro
1 parent e1382854

Better usability when adding a block.

  * Reviewed all block desciptions; changed them to a single, short phrase
    describing the purpose of the block and removed the "term" block since
    it's not necessary in the context
  * Making better use of the space in "add block" popup
app/models/article_block.rb
1 class ArticleBlock < Block 1 class ArticleBlock < Block
2 2
3 def self.description 3 def self.description
4 - _('Display one of your contents.') 4 + _('Display one of your contents')
5 end 5 end
6 6
7 def help 7 def help
app/models/blog_archives_block.rb
@@ -7,7 +7,7 @@ class BlogArchivesBlock &lt; Block @@ -7,7 +7,7 @@ class BlogArchivesBlock &lt; Block
7 include DatesHelper 7 include DatesHelper
8 8
9 def self.description 9 def self.description
10 - _('List posts of your blog') 10 + _('Blog posts')
11 end 11 end
12 12
13 def default_title 13 def default_title
app/models/communities_block.rb
1 class CommunitiesBlock < ProfileListBlock 1 class CommunitiesBlock < ProfileListBlock
2 2
3 def self.description 3 def self.description
4 - __('A block that displays your communities') 4 + __('Communities')
5 end 5 end
6 6
7 def default_title 7 def default_title
app/models/disabled_enterprise_message_block.rb
1 class DisabledEnterpriseMessageBlock < Block 1 class DisabledEnterpriseMessageBlock < Block
2 2
3 def self.description 3 def self.description
4 - _('Disabled enterprise message block') 4 + _('"Disabled enterprise" message')
5 end 5 end
6 6
7 def help 7 def help
app/models/enterprises_block.rb
@@ -9,7 +9,7 @@ class EnterprisesBlock &lt; ProfileListBlock @@ -9,7 +9,7 @@ class EnterprisesBlock &lt; ProfileListBlock
9 end 9 end
10 10
11 def self.description 11 def self.description
12 - __('A block that displays your enterprises') 12 + __('Enterprises')
13 end 13 end
14 14
15 def footer 15 def footer
app/models/environment_statistics_block.rb
1 class EnvironmentStatisticsBlock < Block 1 class EnvironmentStatisticsBlock < Block
2 2
3 def self.description 3 def self.description
4 - _('Statistical overview of your environment.') 4 + _('Environment stastistics')
5 end 5 end
6 6
7 def default_title 7 def default_title
app/models/favorite_enterprises_block.rb
@@ -5,11 +5,11 @@ class FavoriteEnterprisesBlock &lt; ProfileListBlock @@ -5,11 +5,11 @@ class FavoriteEnterprisesBlock &lt; ProfileListBlock
5 end 5 end
6 6
7 def help 7 def help
8 - __('This block lists the favorite enterprises of the user.') 8 + __('This block lists your favorite enterprises.')
9 end 9 end
10 10
11 def self.description 11 def self.description
12 - __('A block that displays your favorite enterprises') 12 + __('Favorite enterprises')
13 end 13 end
14 14
15 def footer 15 def footer
app/models/feed_reader_block.rb
@@ -33,7 +33,7 @@ class FeedReaderBlock &lt; Block @@ -33,7 +33,7 @@ class FeedReaderBlock &lt; Block
33 end 33 end
34 34
35 def self.description 35 def self.description
36 - _('List the latest N posts from a given RSS feed.') 36 + _('Feed reader')
37 end 37 end
38 38
39 def help 39 def help
app/models/friends_block.rb
1 class FriendsBlock < ProfileListBlock 1 class FriendsBlock < ProfileListBlock
2 2
3 def self.description 3 def self.description
4 - __('A block that displays your friends') 4 + __('Friends')
5 end 5 end
6 6
7 def default_title 7 def default_title
app/models/link_list_block.rb
@@ -35,7 +35,7 @@ class LinkListBlock &lt; Block @@ -35,7 +35,7 @@ class LinkListBlock &lt; Block
35 end 35 end
36 36
37 def self.description 37 def self.description
38 - _('Display a list of links.') 38 + _('Links (static menu)')
39 end 39 end
40 40
41 def help 41 def help
app/models/location_block.rb
@@ -4,7 +4,7 @@ class LocationBlock &lt; Block @@ -4,7 +4,7 @@ class LocationBlock &lt; Block
4 settings_items :map_type, :type => :string , :default => 'roadmap' 4 settings_items :map_type, :type => :string , :default => 'roadmap'
5 5
6 def self.description 6 def self.description
7 - _('Location map block') 7 + _('Location map')
8 end 8 end
9 9
10 def help 10 def help
app/models/login_block.rb
1 class LoginBlock < Block 1 class LoginBlock < Block
2 2
3 def self.description 3 def self.description
4 - _('A login box for your users.') 4 + _('Login/logout')
5 end 5 end
6 6
7 def help 7 def help
app/models/main_block.rb
1 class MainBlock < Block 1 class MainBlock < Block
2 2
3 def self.description 3 def self.description
4 - _('Block for main content (i.e. your articles, photos, etc)') 4 + _('Main content')
5 end 5 end
6 6
7 def help 7 def help
app/models/members_block.rb
1 class MembersBlock < ProfileListBlock 1 class MembersBlock < ProfileListBlock
2 2
3 def self.description 3 def self.description
4 - _('A block that displays members.') 4 + _('Members')
5 end 5 end
6 6
7 def default_title 7 def default_title
app/models/my_network_block.rb
@@ -3,7 +3,7 @@ class MyNetworkBlock &lt; Block @@ -3,7 +3,7 @@ class MyNetworkBlock &lt; Block
3 include ActionController::UrlWriter 3 include ActionController::UrlWriter
4 4
5 def self.description 5 def self.description
6 - _('A block that displays a summary of your network') 6 + _('My network')
7 end 7 end
8 8
9 def default_title 9 def default_title
app/models/people_block.rb
@@ -9,7 +9,7 @@ class PeopleBlock &lt; ProfileListBlock @@ -9,7 +9,7 @@ class PeopleBlock &lt; ProfileListBlock
9 end 9 end
10 10
11 def self.description 11 def self.description
12 - _('A block displays random people') 12 + _('Random people')
13 end 13 end
14 14
15 def profile_finder 15 def profile_finder
app/models/products_block.rb
@@ -5,7 +5,7 @@ class ProductsBlock &lt; Block @@ -5,7 +5,7 @@ class ProductsBlock &lt; Block
5 include ActionController::UrlWriter 5 include ActionController::UrlWriter
6 6
7 def self.description 7 def self.description
8 - _('A block that displays products') 8 + _('Products')
9 end 9 end
10 10
11 def default_title 11 def default_title
app/models/profile_image_block.rb
@@ -3,11 +3,11 @@ class ProfileImageBlock &lt; Block @@ -3,11 +3,11 @@ class ProfileImageBlock &lt; Block
3 settings_items :show_name, :type => :boolean, :default => false 3 settings_items :show_name, :type => :boolean, :default => false
4 4
5 def self.description 5 def self.description
6 - _('A block that displays only image of profiles') 6 + _('Picture')
7 end 7 end
8 8
9 def help 9 def help
10 - _('This block presents the profile image.') 10 + _('This block presents the profile image')
11 end 11 end
12 12
13 def content 13 def content
app/models/profile_info_block.rb
1 class ProfileInfoBlock < Block 1 class ProfileInfoBlock < Block
2 2
3 def self.description 3 def self.description
4 - _('Profile information block') 4 + _('Profile information')
5 end 5 end
6 6
7 def help 7 def help
app/models/profile_list_block.rb
@@ -3,7 +3,7 @@ class ProfileListBlock &lt; Block @@ -3,7 +3,7 @@ class ProfileListBlock &lt; Block
3 settings_items :limit, :type => :integer, :default => 6 3 settings_items :limit, :type => :integer, :default => 6
4 4
5 def self.description 5 def self.description
6 - _('A block that displays random profiles') 6 + _('Random profiles')
7 end 7 end
8 8
9 # Override this method to make the block list specific types of profiles 9 # Override this method to make the block list specific types of profiles
app/models/recent_documents_block.rb
1 class RecentDocumentsBlock < Block 1 class RecentDocumentsBlock < Block
2 2
3 def self.description 3 def self.description
4 - _('List of recent content') 4 + _('Last updates')
5 end 5 end
6 6
7 def default_title 7 def default_title
@@ -9,7 +9,7 @@ class RecentDocumentsBlock &lt; Block @@ -9,7 +9,7 @@ class RecentDocumentsBlock &lt; Block
9 end 9 end
10 10
11 def help 11 def help
12 - _('This block lists your recent content.') 12 + _('This block lists your content most recently updated.')
13 end 13 end
14 14
15 settings_items :limit, :type => :integer, :default => 5 15 settings_items :limit, :type => :integer, :default => 5
app/models/sellers_search_block.rb
@@ -5,7 +5,7 @@ class SellersSearchBlock &lt; Block @@ -5,7 +5,7 @@ class SellersSearchBlock &lt; Block
5 end 5 end
6 6
7 def self.short_description 7 def self.short_description
8 - _('Sellers search block') 8 + _('Products/Enterprises search')
9 end 9 end
10 10
11 def default_title 11 def default_title
app/models/slideshow_block.rb
@@ -6,7 +6,7 @@ class SlideshowBlock &lt; Block @@ -6,7 +6,7 @@ class SlideshowBlock &lt; Block
6 settings_items :navigation, :type => 'boolean', :default => false 6 settings_items :navigation, :type => 'boolean', :default => false
7 7
8 def self.description 8 def self.description
9 - _('Slideshow block') 9 + _('Slideshow')
10 end 10 end
11 11
12 def gallery 12 def gallery
app/models/tags_block.rb
@@ -7,7 +7,7 @@ class TagsBlock &lt; Block @@ -7,7 +7,7 @@ class TagsBlock &lt; Block
7 settings_items :limit, :type => :integer, :default => 12 7 settings_items :limit, :type => :integer, :default => 12
8 8
9 def self.description 9 def self.description
10 - _('Block listing content count by tag') 10 + _('Tags')
11 end 11 end
12 12
13 def default_title 13 def default_title
app/views/box_organizer/add_block.rhtml
@@ -7,12 +7,19 @@ @@ -7,12 +7,19 @@
7 7
8 <p><%= _('Select the type of block you want to add to your page.') %></p> 8 <p><%= _('Select the type of block you want to add to your page.') %></p>
9 9
10 - <% @block_types.each do |item| %>  
11 - <div>  
12 - <%= radio_button_tag('type', item.name) %>  
13 - <%= item.description %> 10 + <% @block_types.in_groups_of(2) do |block1, block2| %>
  11 + <div style='float: left; width: 48%; padding-top: 2px;'>
  12 + <%= radio_button_tag('type', block1.name) %>
  13 + <%= label_tag "type_#{block1.name.downcase}", block1.description %>
14 </div> 14 </div>
  15 + <% if block2 %>
  16 + <div style='float: left; width: 48%; padding-top: 2px;'>
  17 + <%= radio_button_tag('type', block2.name) %>
  18 + <%= label_tag "type_#{block2.name.downcase}", block2.description %>
  19 + </div>
  20 + <% end %>
15 <% end %> 21 <% end %>
  22 + <br style='clear: both'/>
16 23
17 <% button_bar do %> 24 <% button_bar do %>
18 <%= submit_button(:add, _("Add")) %> 25 <%= submit_button(:add, _("Add")) %>