adbanner-test/app/views/admin/ad_images/new.html.erb

24 lines
651 B
Plaintext
Raw Normal View History

2014-04-11 07:47:33 +00:00
<%= form_for(@ad_image, url: {action: "create"}) do |f| %>
<% I18n.available_locales.each do |locale| %>
Title <%= locale.to_s %>:
<%= f.fields_for :title_translations do |n| %>
<%= n.text_field locale %>
<% end %>
Context <%= locale.to_s %>:
<%= f.fields_for :context_translations do |n| %>
<%= n.text_area locale %>
<% end %>
<% end %>
<p>
<label>Image</label>
<%= image_tag(@ad_image.file_url) if @ad_image.file? %>
<%= f.file_field :file %>
<%= f.hidden_field :file_cache %>
</p>
2014-04-11 08:26:34 +00:00
<%= f.select :banner_id, @ad_banners.collect{|t| [ t.title, t.id ]} %>
2014-04-11 07:47:33 +00:00
<%= f.submit "Create Banner Image" %>
<% end %>