Sha256: 0d4ff067a163b38a7b601c6980bed005a04e30fc0a6b82bf3b94d3d00ec4919e
Contents?: true
Size: 995 Bytes
Versions: 5
Compression:
Stored size: 995 Bytes
Contents
ActiveAdmin.register C80Map::Building, as: 'Building' do menu :label => "Buildings", :parent => 'Карта' before_filter :skip_sidebar!, :only => :index permit_params :img_bg, :img_overlay, :coords, :tag config.sort_order = 'id_asc' index do column :tag # column :coords column 'img_bg' do |sp| "#{ link_to image_tag(sp.img_bg.thumb.url, :style => 'background-color: #cfcfcf;'), sp.img_bg.url, :target => '_blank' }<br> ".html_safe end # column 'img_overlay' do |sp| # "#{ link_to image_tag(sp.img_overlay.thumb.url), sp.img_overlay.url, :target => '_blank' }<br> # ".html_safe # end actions end form(:html => {:multipart => true}) do |f| f.inputs 'Properties' do f.input :tag f.input :coords f.input :img_bg, :hint => "#{image_tag(f.object.img_bg.thumb.url)}".html_safe f.input :img_overlay, :hint => "#{image_tag(f.object.img_overlay.thumb.url)}".html_safe end f.actions end end
Version data entries
5 entries across 5 versions & 1 rubygems