<%= error_messages_for 'blog' %>

<%= _('My Blog') %>

<%= render :file => 'shared/tiny_mce' %> <%= f.text_field('title', :size => '64') %> <%= labelled_form_field(_('Description:'), text_area(:article, :body, :cols => 64, :rows => 10)) %> <%= labelled_form_field(_('Posts per page:'), f.select(:posts_per_page, [5, 10, 20, 50, 100])) %> <% f.fields_for 'feed', @article.feed do |feed| %> <%= labelled_form_field(_('Limit of posts in RSS Feed'), feed.select(:limit, [5, 10, 20, 50])) %> <%= labelled_form_field(_('Use as description in RSS Feed:'), feed.select(:feed_item_description, [ [ _('Article body'), 'body'], [ _('Article abstract'), 'abstract'] ])) %> <% end %> <% f.fields_for 'external_feed_builder', @article.external_feed do |efeed| %>
<% enabled = @article.external_feed && @article.external_feed.enabled %> <% only_once = @article.external_feed ? @article.external_feed.only_once : true %> <%= labelled_check_box(_('Fetch posts from an external feed'), 'article[external_feed_builder][enabled]', 'true', enabled, {:onchange => "$('external-feed-options').toggle()"}) %> <%= hidden_field_tag 'article[external_feed_builder][enabled]', 'false' %>
<%= efeed.hidden_field(:id) %> <%= labelled_form_field( _('Feed address'), efeed.text_field(:address) ) %>
<%= labelled_radio_button( _('Fetch posts only once'), 'article[external_feed_builder][only_once]', 'true', only_once) %> <%= labelled_radio_button( _('Fetch posts periodically'), 'article[external_feed_builder][only_once]', 'false', !only_once) %>

<%= _('Feeds are updated in batches periodically. Please note that your posts will not be fetched immediately.') %>

<% end %> <%= javascript_tag "$('back_to').value = 'control_panel'" %>