<% content_for :sidebar do %>
  <% fields_for :photo do |f| -%>
    <%= render :partial => 'options', :locals => { :f => f } %>
  <% end %>
<% end %>

<fieldset class="clearfix">
	<p>
		<%= f.label :title %>
  	<%= f.text_field :title  %>
	</p>
	
	<p>
		<label for="photo_data"><%= label_text_for_photo @photo %></label>
		<%= f.file_field :data %>
	</p>
	
	<% unless @photo.new_record? -%>
		<p>
    	<%= link_to(image_tag(@photo.base_url(:medium)), @photo.filename) %>
		</p>
	<% end %>
	
	<p>
  <%= f.label :draft, "Save as a draft" %>
  <label class="light">
    <%= check_box_tag :draft, '1', @photo.draft?, :id => 'article_draft' %> <%= "Save this/these photos as a draft" %>
  </label>
	</p>
	
  <p id="publish_date" style="<%= @photo.draft? ? "display:none" : "" %>">
    <%= f.label :published_at, "Publish on date: " %>
    <%= f.datetime_select :published_at,
                          :start_year => (@photo.published_at || Time.zone.now).year-1,
                          :end_year => (Time.zone.now.year + 5),
                          :order => [:month, :day, :year] %>
  </p>
</fieldset>

<% content_for :sidebar do %>
  <% fields_for :photo do |f| -%>
    <%= render :partial => 'options', :locals => { :f => f } %>
  <% end %>
<% end %>

<fieldset class="clearfix">
	<p>
		<%= f.label :title %>
  	<%= f.text_field :title  %>
	</p>
	
	<p>
		<label for="photo_data"><%= label_text_for_photo @photo %></label>
		<%= f.file_field :data %>
	</p>
	
	<% unless @photo.new_record? -%>
		<p>
    	<%= link_to(image_tag(@photo.base_url(:large)), @photo.filename) %>
		</p>
	<% end %>
	
	<p>
  <%= f.label :draft, "Save as a draft" %>
  <label class="light">
    <%= check_box_tag :draft, '1', @photo.draft?, :id => 'article_draft' %> <%= "Save this/these photos as a draft" %>
  </label>
	</p>
	
  <p id="publish_date" style="<%= @photo.draft? ? "display:none" : "" %>">
    <%= f.label :published_at, "Publish on date: " %>
    <%= f.datetime_select :published_at,
                          :start_year => (@photo.published_at || Time.zone.now).year-1,
                          :end_year => (Time.zone.now.year + 5),
                          :order => [:month, :day, :year] %>
  </p>
</fieldset>

Fix photo size so layout doesn't break.
Fix photo size so layout doesn't break.
