Event management added to the back office.
Includes date filters, and the possibility to extract most data. Refs #155
This commit is contained in:
parent
55122888e1
commit
f749ba984e
|
@ -0,0 +1,69 @@
|
||||||
|
ActiveAdmin.register Event do
|
||||||
|
permit_params :title, :start_time, :end_time, :repeat, :rule, :description,
|
||||||
|
:place_name, :address, :city, :region_id, :locality, :url,
|
||||||
|
:contact, :submitter, :tag_list
|
||||||
|
|
||||||
|
scope :all
|
||||||
|
scope :moderated, default: true
|
||||||
|
scope :unmoderated
|
||||||
|
|
||||||
|
config.sort_order = 'start_time_desc'
|
||||||
|
|
||||||
|
filter :region
|
||||||
|
filter :start_time
|
||||||
|
|
||||||
|
index do
|
||||||
|
column :title
|
||||||
|
column :start_time
|
||||||
|
column :end_time
|
||||||
|
column :city
|
||||||
|
column :region
|
||||||
|
column :repeat
|
||||||
|
column :rule
|
||||||
|
column :moderated
|
||||||
|
actions
|
||||||
|
end
|
||||||
|
|
||||||
|
csv do
|
||||||
|
column :title
|
||||||
|
column :start_time
|
||||||
|
column :end_time
|
||||||
|
column :place_name
|
||||||
|
column :address
|
||||||
|
column :city
|
||||||
|
column :region
|
||||||
|
column :locality
|
||||||
|
column :url
|
||||||
|
column :contact
|
||||||
|
column :submitter
|
||||||
|
column :tag_list
|
||||||
|
column :repeat
|
||||||
|
column :rule
|
||||||
|
end
|
||||||
|
|
||||||
|
show do
|
||||||
|
attributes_table do
|
||||||
|
row :title
|
||||||
|
row :start_time
|
||||||
|
row :end_time
|
||||||
|
row :place_name
|
||||||
|
row :address
|
||||||
|
row :city
|
||||||
|
row :region
|
||||||
|
row :description do
|
||||||
|
simple_format event.description
|
||||||
|
end
|
||||||
|
row :locality
|
||||||
|
row :url do
|
||||||
|
link_to event.url, event.url
|
||||||
|
end
|
||||||
|
row :contact do
|
||||||
|
mail_to event.contact, event.contact
|
||||||
|
end
|
||||||
|
row :submitter do
|
||||||
|
mail_to event.submitter, event.submitter
|
||||||
|
end
|
||||||
|
end
|
||||||
|
active_admin_comments
|
||||||
|
end
|
||||||
|
end
|
|
@ -13,9 +13,6 @@ ActiveAdmin.register Orga do
|
||||||
filter :region
|
filter :region
|
||||||
|
|
||||||
index do
|
index do
|
||||||
column :id do |orga|
|
|
||||||
link_to orga.id, orga
|
|
||||||
end
|
|
||||||
column :kind
|
column :kind
|
||||||
column :name
|
column :name
|
||||||
column :city
|
column :city
|
||||||
|
@ -42,25 +39,24 @@ ActiveAdmin.register Orga do
|
||||||
column :active
|
column :active
|
||||||
end
|
end
|
||||||
|
|
||||||
show do |l|
|
show do
|
||||||
attributes_table do
|
attributes_table do
|
||||||
row :kind
|
row :kind
|
||||||
row :name
|
row :name
|
||||||
row :address
|
row :address
|
||||||
row :city
|
row :city
|
||||||
row :region
|
row :region
|
||||||
h3 Orga.human_attribute_name :description
|
row :description do
|
||||||
section do
|
simple_format orga.description
|
||||||
simple_format l.description
|
|
||||||
end
|
end
|
||||||
row :url do
|
row :url do
|
||||||
link_to l.url, l.url
|
link_to orga.url, orga.url
|
||||||
end
|
end
|
||||||
row :feed do
|
row :feed do
|
||||||
link_to l.feed, l.feed
|
link_to orga.feed, orga.feed
|
||||||
end
|
end
|
||||||
row :contact do
|
row :contact do
|
||||||
mail_to l.contact, l.contact
|
mail_to orga.contact, orga.contact
|
||||||
end
|
end
|
||||||
row :active
|
row :active
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue