Sha256: 41293ef887740b4a0c2f7b9584df4e483b13de1edc362f1b0c6e46b14fe7005e

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

-#
-# ish_manager / maps / _form
-#

- url = params[:action] == 'new' ? maps_path : map_path(@map.id)

= form_for @map, :html => { :multipart => true }, url: url do |f|
  - if @map.errors.any?
    #error_explanation
      %h2= "#{pluralize(@map.errors.count, "error")} prohibited this map from being saved:"
      %ul
        - @map.errors.full_messages.each do |message|
          %li= message

  .row
    .col-md-3
      .field
        = f.label :name
        = f.text_field :name
      .field
        = f.label :map_slug, "Map slug (if any)"
        = f.text_field :map_slug
    .col-md-3
      .field
        = f.label :slug
        = f.text_field :slug
      .field
        = f.label :parent_slug
        = f.text_field :parent_slug
    .col-md-2
      .field
        = f.label :ordering_type
        = f.select :ordering_type, options_for_select(::Gameui::Map::ORDERING_TYPES)
    .col-md-4

      .field
        = f.label :image
        = file_field_tag :image
        = image_tag @map.image.image.url(:thumb) rescue nil

  .field
    = f.label :description
    = f.text_area :description, class: 'tinymce'

  .actions
    = f.submit 'Save'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ish_manager-0.1.8.252 app/views/ish_manager/maps/_form.haml
ish_manager-0.1.8.251 app/views/ish_manager/maps/_form.haml
ish_manager-0.1.8.250 app/views/ish_manager/maps/_form.haml