<%= tinymce_assets %>
<div class="container-fluid">
  <%= semantic_form_for [@neuigkeit.rubrik,@neuigkeit] do |f| %>
  <%= f.inputs do %>
  <div class="row-fluid">
    <div class="span12">
      <%= f.input :title,   :placeholder=> "Titel" %>
      <%= f.input :text,    :as=> :tinymce_text    %>
    </div>  
  </div>
  <div class="row-fluid">
    <div class="span6">
      <%  f.input :datum,   :as=> :datepicker      %>
      <%= f.input :rubrik,  :as=> :radio, :collection=>Rubrik.all %>
    </div>  
    <div class="span6">  
      <%= f.input :author,  :as=> :select           %>
    </div>  
  </div>  
  <div class="row-fluid">
    <div class="span12"> 
      <%= f.input :picture, :as=> :file %>
    </div>  
  </div>  
  
  <%= f.semantic_fields_for :calentries , @calentries do |calentry| %>
  <%= render 'calentries/nested_fields', :f => calentry %> 
  <% end %>
      
  <% end %>
  <%= f.actions do %>
  <%= f.action :submit, :as => :input %>
  <% end %>
  <% end %>
</div>
<script>
  $(document).ready(function(){
    $('.datetimepicker').map($(this).datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""}))
  })
  $(document).ready(function(){$('.datetimepicker').datetimepicker({format: 'd.m.Y H:i', startDate: (!($(this).attr("value")==undefined))? $(this).attr("value"): ""})})
</script>
<%= tinymce %>
