<% if @block.box.owner.kind_of?(Environment) and @block.box.owner.portal_community.nil? %>

<%= _("You don't have an community defined as the portal community. Define it before use this block properly.") %>

<% 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 %>