diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e912727..866e002 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -11,6 +11,8 @@ module ApplicationHelper include FormsHelper include AssetsHelper + + include BlockHelper # Displays context help. You can pass the content of the help message as the # first parameter or using template code inside a block passed to this diff --git a/app/models/block.rb b/app/models/block.rb index 1356df8..9273947 100644 --- a/app/models/block.rb +++ b/app/models/block.rb @@ -4,6 +4,9 @@ class Block < ActiveRecord::Base include ActionView::Helpers::UrlHelper include ActionView::Helpers::TagHelper + # Block-specific stuff + include BlockHelper + acts_as_list :scope => :box belongs_to :box diff --git a/app/models/environment_statistics_block.rb b/app/models/environment_statistics_block.rb index 4ae0453..0c5dc0a 100644 --- a/app/models/environment_statistics_block.rb +++ b/app/models/environment_statistics_block.rb @@ -15,7 +15,7 @@ class EnvironmentStatisticsBlock < Block n_('One community', '%{num} communities', communities) % { :num => communities }, ] - content_tag('h3', _('Statistics for %s') % owner.name, :class => 'block-title' ) + content_tag('ul', info.map {|item| content_tag('li', item) }.join("\n")) + block_title(('Statistics for %s') % owner.name) + content_tag('ul', info.map {|item| content_tag('li', item) }.join("\n")) end end diff --git a/app/models/recent_documents_block.rb b/app/models/recent_documents_block.rb index f6946ec..95fde72 100644 --- a/app/models/recent_documents_block.rb +++ b/app/models/recent_documents_block.rb @@ -14,7 +14,7 @@ class RecentDocumentsBlock < Block owner.recent_documents(self.limit) end - content_tag('h3', _('Recent content'), :class => 'block-title') + + block_title(_('Recent content')) + content_tag('ul', docs.map {|item| content_tag('li', link_to(item.title, item.url))}.join("\n")) end diff --git a/app/models/tags_block.rb b/app/models/tags_block.rb index 851a334..8968e29 100644 --- a/app/models/tags_block.rb +++ b/app/models/tags_block.rb @@ -8,7 +8,7 @@ class TagsBlock < Block end def content - content_tag('h3', _('Tags'), :class => 'block-title') + + block_title(_('Tags')) + help_textile( _('The tag is created when you add some one to your article. Try to add some tags to some articles and see your tag cloud to grow.'), -- libgit2 0.21.2