-# -# ish_manager / markers / _form -# -# @TODO: can I not have this url at all? - url = %w|new create|.include?(params[:action]) ? markers_path : marker_path(@marker.id) .markers--form = form_for @marker, :html => { :multipart => true }, url: url do |f| = render 'ish_manager/application/form_errors', item: @marker .actions = f.submit 'Save' .row .col.s4 = f.label :map = f.select :map_id, options_for_select(@maps_list, selected: @marker.map_id || params[:map_id]) .col.s4 .field = f.label :name = f.text_field :name .col.s4 .field = f.label :destination = f.select :destination_id, options_for_select(@maps_list, selected: @marker.destination_id) .row .col.s3 .field = f.label :image = file_field_tag :image .image-thumb = image_tag(@marker.image.image.url(:original)) rescue nil = image_tag('icons/10x10_red-cross.png', class: 'red-cross', style: "top: #{@marker.centerOffsetY-10}px; left: #{@marker.centerOffsetX-10}px;" ) .field = f.label :asset3d = file_field_tag :asset3d .col.s3 .field = f.label :centerOffsetX = f.text_field :centerOffsetX .field = f.label :centerOffsetY = f.text_field :centerOffsetY .col.s3 .field = f.label :x = f.text_field :x .field = f.label :y = f.text_field :y .col.s3 .field = f.label :title_image = file_field_tag :title_image = image_tag @marker.title_image.image.url(:thumb) rescue nil = render 'ish_manager/application/form_nonpublic', f: f, model: @marker .field = f.label :url, "URL (if any)" = f.text_field :url .row .col.s3   .col.s6 .field = f.label :description = f.text_area :description .row .col.s4 .field = f.label :item_type = f.select :item_type, options_for_select( ::Gameui::Marker::ITEM_TYPES, selected: @marker.item_type ) .col.s4 .field = f.label :ordering = f.text_field :ordering .col.s4 .row .col.s3   .col.s6 .row .col.s6 .field = f.check_box :is_active = f.label :is_active .col.s6 .google-maps.row .col.s4 = f.label "x, y" .col.s4 = f.text_field :x .col.s4 = f.text_field :y .actions = f.submit 'Save'