diff --git a/app/models/article_block.rb b/app/models/article_block.rb index 0fe811e..14281c4 100644 --- a/app/models/article_block.rb +++ b/app/models/article_block.rb @@ -12,7 +12,11 @@ class ArticleBlock < Block block = self lambda do block_title(block.title) + - (block.article ? article_to_html(block.article, :gallery_view=>false, :inside_block=>block) : _('Article not selected yet.')) + (block.article ? article_to_html(block.article, + :gallery_view => false, + :inside_block => block, # For Blogs and folders + :format => block.visualization_format # For Articles and contents + ) : _('Article not selected yet.')) end end diff --git a/app/views/box_organizer/_article_block.rhtml b/app/views/box_organizer/_article_block.rhtml index 7eccaa1..171486d 100644 --- a/app/views/box_organizer/_article_block.rhtml +++ b/app/views/box_organizer/_article_block.rhtml @@ -9,15 +9,33 @@ firstText = articles[articles.find_index{|a| a.kind_of?TextArticle}||-1] selected = @block.article || firstText %> - <%= select_tag('block[article_id]', options_for_select_with_title(articles.map {|item| [item.path, item.id]}, selected.id), :onchange => 'jQuery("#block_blog_options").toggle(this.blogs.indexOf(this.value) != -1)') %> -