= simple_form_for @news, :url => news_form_url do |f| - main_content "News List" do %fieldset{ :class=>"inputs"} = f.association :category, :as => :hidden %ol %li = f.input :title %li = f.input :standfirst, :input_html => { :rows => 4 } %li = f.input :image %li #button-bar.input-buttons = f.label :content = f.input_field :content, :data => {:wmd => "news_content"} = render "ems/globals/asset", :form => f %fieldset{ :class=>"button"} %ol %li = f.submit - side_content do %fieldset{ :class=>"inputs"} %ol %li = f.input :status, :as => :select, :collection => [:draft, :pending, :live], :include_blank => false %li = f.input :publish_from, :as => :string, :input_html => { :class => 'datepicker', :value => @news.try(:publish_from).try(:strftime,'%d/%m/%Y'), :data => { :alt_date => "alt-date-" }} %li = f.association :channels, :collection => Ems::Channel.joins(:categories).where(:ems_categories_channels => {:category_id => @news.category.id}) %li / this works but needs tidying in CSS, JS and markup = f.label :tags %input{ :type=>:text, :data => { :tagcomplete => "/ems/tags.json", :tagcomplete_pills => "#tag-list" }} %ul#tag-list.pill-list - @news.tags.each do |tag| %li.pill{:id=>"tag-list-#{tag.id}"} = tag.title %span.close × .hidden_fields = f.association :tags %li = f.label "News Priority" = f.input :hot = f.input :featured