Sha256: 5b1eeb1e0f7b019c0186b05baeeff84a61037dd886f8181a210a92750d2bd20f
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
ActiveAdmin.register C80MapFloors::MapBuilding, as: 'MapBuilding' do menu :label => 'Полигоны зданий', :parent => 'Карта'#, :if => proc { current_admin_user.email == 'tz007@mail.ru' } before_filter :skip_sidebar!, :only => :index permit_params :img, :coords, :coords_img, :tag, :title config.sort_order = 'id_asc' index do column :id column :tag column :title column :coords do |mp| d = mp.coords "<div style='width:100px;overflow:hidden;'>#{d}</div>".html_safe end column :coords_img do |mp| d = mp.coords_img "<div style='width:70px;overflow:hidden;'>#{d}</div>".html_safe end column :created_at column :updated_at # column 'img' do |sp| # "#{ link_to image_tag(sp.img.thumb.url, :style => 'background-color: #cfcfcf;'), sp.img.url, :target => '_blank' }<br> # ".html_safe # end actions end form(:html => {:multipart => true}) do |f| f.inputs 'Свойства' do f.input :tag f.input :title f.input :coords f.input :coords_img # f.input :img, :hint => "#{image_tag(f.object.img.thumb.url) if f.object.img.present?}".html_safe end f.actions end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
c80_map_floors-0.1.0.2 | app/admin/c80_map_floors/map_buildings.rb |
c80_map_floors-0.1.0.1 | app/admin/c80_map_floors/map_buildings.rb |