2014-04-21 18:19:03 +00:00
|
|
|
<%= form_for @map, html: { multipart: true, class: 'square' } do |f| %>
|
|
|
|
<%= render 'shared/errors', messages: @map.errors.full_messages %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-21 18:19:03 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :name %>
|
|
|
|
<%= f.text_field :name %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :category_id %>
|
|
|
|
<%= f.select :category_id, Category.ordered.domain(Category::DOMAIN_GAMES).collect { |c| [c, c.id] } %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :download %>
|
|
|
|
<%= f.text_field :download %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :picture %>
|
|
|
|
<div class="inputs">
|
|
|
|
<% if @map.picture.length > 0 %>
|
|
|
|
<%= image_tag @map.picture %><br>
|
|
|
|
<% end %>
|
2014-03-23 00:22:25 +00:00
|
|
|
<%= f.file_field :picture %>
|
2014-04-21 18:19:03 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Update Map' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|