_article_block.rhtml
550 Bytes
<div class='article-block-edition'>
<% if @block.box.owner.kind_of?(Environment) and @block.box.owner.portal_community.nil? %>
<p id='no_portal_community'>
<%= _("You don't have an community defined as the portal community. Define it before use this block properly.") %>
</p>
<% else %>
<% articles = @block.available_articles.select {|article| !article.folder? } %>
<%= select_tag('block[article_id]', options_for_select_with_title(articles.map {|item| [item.path, item.id]}, @block.article ? @block.article.id : nil)) %>
<% end %>
</div>