Sha256: 1f393abb6a9e9759e939196e53f60cdb5542a8051f247ef2dd54b5a9eccad526

Contents?: true

Size: 1.7 KB

Versions: 2

Compression:

Stored size: 1.7 KB

Contents

-#
-# ish_manager / maps / show.haml
-#

.maps-show
  = render 'map_meta_row', map: @map
  %p.addToggle Description [<>]
  .descr= raw @map.description

  %p.addToggle
    The Map (#{@map.w}x#{@map.h})
    = link_to 'Map Editor', location_map_editor_path(@map.id)
    [<>]
  .the-map
    = image_tag @map.image.image.url(:original) rescue nil
    - @markers.each do |marker|
      -# @TODO: this should be a partial
      .marker{ style: "position: absolute; left: #{marker.x - marker.centerOffsetX}px; top: #{marker.y - marker.centerOffsetY}px;" }
        - if marker.image
          = image_tag marker.image.image.url(:original)
        - else
          = image_missing_tag

  %p.addToggle Markers (#{@markers.count}) [<>]
  .markers-list
    - @markers.each do |marker|
      .flex-row.bordered
        - if marker.title_image
          = image_tag marker.title_image.image.url(:original)
        - else
          = image_missing_tag
        .flat-row
          .a= marker.slug
          .a= button_to '~', edit_marker_path(marker), method: :get
          .a= button_to 'x', marker_path(marker), method: :delete, data: { confirm: 'Are you sure?' }
          .a= link_to '[api]', api_marker_path(marker)
          .a= link_to '[this map]', edit_map_path(marker.slug)
      .hide
        %ul.bullets
          %li <b>item_type:</b> #{marker.item_type}

  %p.addToggle Newsitems (#{@map.newsitems.count}) [<>]
  = render 'ish_manager/newsitems/index', newsitems: @map.newsitems

  %p.addToggle Maps (#{@maps.count}) [<>]
  .maps-list
    - @maps.each do |m|
      .item
        = link_to m.slug, edit_map_path(m.id)

%hr
= render 'form'

= button_to 'Export Subtree', export_map_path(@map.id, format: :json)

= render 'index_item', map: @map

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ish_manager-0.1.8.294 app/views/ish_manager/maps/show.haml
ish_manager-0.1.8.293 app/views/ish_manager/maps/show.haml