Sha256: f0b2d54dfe2e7d4dfb40fed4b9de3c805e8cdf9c410d509b508d09cdc97810c6

Contents?: true

Size: 1.81 KB

Versions: 2

Compression:

Stored size: 1.81 KB

Contents

-#
-# ish_manager / maps / _form
-#

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

= form_for @map, :html => { :multipart => true, class: 'maps--form' }, 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.s3
      .field
        = f.label :name
        = f.text_field :name
      .field
        = f.label :map_slug, "Map slug (if any)"
        = f.text_field :map_slug
    .col.s3
      .field
        = f.label :slug
        = f.text_field :slug
      .field
        = f.label :parent_slug
        = f.text_field :parent_slug
    .col.s2
      .field
        = f.label :ordering_type
        = f.select :ordering_type, options_for_select(::Gameui::Map::ORDERING_TYPES, selected: @map.ordering_type)
      .field
        = f.label :rated
        = f.select :rated, options_for_select(Location::RATED_OPTIONS, selected: @map.rated)
      .field
        = f.label :premium_tier
        = f.number_field :premium_tier
    .col.s4
      .field
        = f.label :image
        = file_field_tag :image
        = image_tag @map.image.image.url(:thumb) rescue nil

  = render 'ish_manager/application/form_nonpublic', f: f, model: @map

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

  .row
    .col.s6
      = f.label "Labels"
      = f.text_area :labels, class: 'large'
      %pre.small
        description
        map
        markers
        newsitems
    .col.s6
      = f.label "Config"
      = f.text_area :config, class: 'large'
      %pre.small
        description.collapsible: bool
        map_panel_type: "MapPanel" | "MapPanelNoZoom" | "ThreePanelV1"
  .actions
    = f.submit 'Save'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ish_manager-0.1.8.260 app/views/ish_manager/maps/_form.haml
ish_manager-0.1.8.259 app/views/ish_manager/maps/_form.haml