agenda-libre-ruby/app/admin/orga.rb

52 lines
940 B
Ruby

ActiveAdmin.register Orga do
permit_params :kind_id, :name, :description, :url, :city, :department,
:region_id, :active
scope :active
scope :moderated
scope :unmoderated
config.sort_order = 'updated_at_desc'
index do
column :kind
column :name
column :url
column :city
column :department
column :region
column :active
column :updated_at
actions
end
show do |l|
attributes_table do
row :kind
row :name
row :description, as: :pagedown_text
row :url do
link_to l.url, l.url
end
row :city
row :department
row :region
row :active
end
active_admin_comments
end
form do |f|
f.inputs do
f.input :kind
f.input :name
f.input :description
f.input :url
f.input :city
f.input :department
f.input :region
f.input :active
end
f.actions
end
end