<%= legend_tag 'About This Article' -%>
<%= f.text_field :headline -%> <%= f.text_field :subheader, :help => 'An optional secondary headline for this content.' -%> <%= f.text_field :author, :help => 'Optionally provide the name of the author.' -%> <%= f.date_select :publication_date, :order => [:month, :day, :year] -%> <%= f.select :state, ManagedContent::STATES.map{|s| s.capitalize}, :label => 'Status' -%>
<%- if @managed_content.content.blank? -%> <%= f.select :kind, ['Single Page','Multiple Pages'], :label => 'Pages' -%> <%- end -%> <%= f.text_field :desired_slug, :label => 'Permalink', :value => @managed_content.slug, :help => "The permalink is the portion of the URL that refers directly to this article. The full URL will consist of the permalink for the publication plus what you enter below, e.g. /#{@publication.slug}/#{@managed_content.slug || 'foo'}/" -%> <%= f.text_area :summary, :help => 'The summary should provide a brief description of the content, up to 255 characters. The summary may be used by search engines to describe the content on this page.' -%>
<%- if @managed_content.content.blank? -%> <%- end -%>
<%= legend_tag 'Content ' -%> <%= f.cktext_area :content, :toolbar => 'Full', :width => '900px', :height => '450px' -%>
<%= legend_tag 'References', :help => 'Add information about any external references that are related to this content.' -%> <%= f.cktext_area :references, :toolbar => 'Basic', :width => '900px'-%>
<%- if @publication.managed_contents.count > 1 -%>
<%= legend_tag 'Related Content', :help => 'Select other relevant articles on this site that are related to this content.' -%> <%- @publication.managed_contents.reject{|c| c == @managed_content}.sort{|a,b| a.headline <=> b.headline}.in_groups(2, false) do |column| -%>
<%- column.each do |content| -%>
<%= check_box "managed_content", "managed_content_related_content[]", {:checked => @managed_content.related_content.include?(content), :name => "managed_content[related_content][]"}, content.id, nil -%> <%= content.headline -%>
<%- end -%>
<%- end -%>
<%- end -%>