edit.rhtml 1.2 KB
<%= error_messages_for 'article' %>

<% labelled_form_for 'article', @article, :html => { :multipart => true } do |f| %>

  <%= hidden_field_tag("type", @type) if @type %>

  <%= hidden_field_tag('parent_id', @parent_id) if @parent_id %>

  <%= render :partial => partial_for_class(@article.class), :locals => { :f => f } %>

  <% button_bar do %>
    <%= submit_button :save, _('Save') %>
  <% end %>

  <div style='float: right'>
    <%= lightbox_button :help, _('Why categorize?'), :action => 'why_categorize' %>
  </div>

  <%= select_categories(:article, _('Categorize your article')) %>

  <%= f.text_field('tag_list', :size => 64) %>
  <%= content_tag( 'small', _('Separate tags with commas') ) %>

  <div id='edit-article-options'>
    <h4><%= _('Options') %></h4>
    <div>
      <%= check_box :article, :published %>
      <label for='article_published'><%= _('Published')%></label>
    </div>
  </div>

  <% button_bar do %>
    <%= submit_button :save, _('Save') %>
    <% if @parent_id || @article.parent %>
      <%= button :cancel, _('Cancel'), :action => 'view', :id => @parent_id || @article.parent %>
    <% else %>
      <%= button :cancel, _('Cancel'), :action => 'index' %>
    <% end %>
  <% end %>
<% end %>