Migration to active admin 2
This commit is contained in:
parent
c44eaf30f6
commit
460efbe667
30
Gemfile.lock
30
Gemfile.lock
|
@ -33,18 +33,18 @@ GEM
|
|||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
actionview-encoded_mail_to (1.0.9)
|
||||
rails
|
||||
activeadmin (1.4.3)
|
||||
arbre (>= 1.1.1)
|
||||
coffee-rails
|
||||
activeadmin (2.0.0)
|
||||
arbre (~> 1.2, >= 1.2.1)
|
||||
formtastic (~> 3.1)
|
||||
formtastic_i18n
|
||||
inherited_resources (>= 1.9.0)
|
||||
jquery-rails (>= 4.2.0)
|
||||
kaminari (>= 0.15)
|
||||
railties (>= 4.2, < 5.3)
|
||||
ransack (>= 1.8.7)
|
||||
sass (~> 3.1)
|
||||
sprockets (< 4.1)
|
||||
formtastic_i18n (~> 0.4)
|
||||
inherited_resources (~> 1.7)
|
||||
jquery-rails (~> 4.2)
|
||||
kaminari (~> 1.0, >= 1.0.1)
|
||||
railties (>= 5.0, < 6.0)
|
||||
ransack (~> 2.1, >= 2.1.1)
|
||||
sass (~> 3.4)
|
||||
sprockets (>= 3.0, < 4.1)
|
||||
sprockets-es6 (~> 0.9, >= 0.9.2)
|
||||
activejob (5.2.3)
|
||||
activesupport (= 5.2.3)
|
||||
globalid (>= 0.3.6)
|
||||
|
@ -71,6 +71,10 @@ GEM
|
|||
activesupport (>= 3.0.0)
|
||||
arel (9.0.0)
|
||||
ast (2.4.0)
|
||||
babel-source (5.8.35)
|
||||
babel-transpiler (0.7.0)
|
||||
babel-source (>= 4.0, < 6)
|
||||
execjs (~> 2.0)
|
||||
bcrypt (3.1.12)
|
||||
bindex (0.7.0)
|
||||
brakeman (4.5.0)
|
||||
|
@ -384,6 +388,10 @@ GEM
|
|||
sprockets (3.7.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-es6 (0.9.2)
|
||||
babel-source (>= 5.8.11)
|
||||
babel-transpiler
|
||||
sprockets (>= 3.0.0)
|
||||
sprockets-rails (3.2.1)
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
ActiveAdmin.register Orga do
|
||||
permit_params :kind_id, :name, :description, :url, :city, :department,
|
||||
:region_id, :active
|
||||
permit_params :active, :kind_id, :name, :description, :url, :city, :region_id
|
||||
|
||||
scope :active
|
||||
scope :all, default: true
|
||||
scope :moderated
|
||||
scope :unmoderated
|
||||
|
||||
config.sort_order = 'updated_at_desc'
|
||||
|
||||
filter :active, as: :radio
|
||||
filter :kind, as: :check_boxes
|
||||
filter :name
|
||||
filter :region
|
||||
|
@ -16,23 +16,36 @@ ActiveAdmin.register Orga do
|
|||
column :kind
|
||||
column :name
|
||||
column :city
|
||||
column :department
|
||||
column :region
|
||||
column :url
|
||||
column :feed
|
||||
column :contact
|
||||
column :submitter
|
||||
column :updated_at
|
||||
column :active
|
||||
actions
|
||||
end
|
||||
|
||||
csv do
|
||||
column(:kind) { |o| o.kind.name }
|
||||
column :name
|
||||
column :contact
|
||||
column :submitter
|
||||
column :updated_at
|
||||
column :active
|
||||
end
|
||||
|
||||
show do |l|
|
||||
attributes_table do
|
||||
row :kind
|
||||
row :name
|
||||
row :description
|
||||
row :address
|
||||
row :city
|
||||
row :department
|
||||
row :region
|
||||
h3 Orga.human_attribute_name :description
|
||||
section do
|
||||
simple_format l.description
|
||||
end
|
||||
row :url do
|
||||
link_to l.url, l.url
|
||||
end
|
||||
|
@ -48,16 +61,20 @@ ActiveAdmin.register Orga do
|
|||
end
|
||||
|
||||
form do |f|
|
||||
f.semantic_errors
|
||||
f.inputs do
|
||||
f.input :kind
|
||||
f.input :name
|
||||
f.input :address, as: :string
|
||||
f.input :city
|
||||
f.input :department
|
||||
f.input :region
|
||||
f.input :latitude
|
||||
f.input :longitude
|
||||
f.input :description
|
||||
f.input :url
|
||||
f.input :feed
|
||||
f.input :contact
|
||||
f.input :submitter
|
||||
f.input :active
|
||||
end
|
||||
f.actions
|
||||
|
|
|
@ -1,6 +1,19 @@
|
|||
ActiveAdmin.register I18n::Backend::ActiveRecord::Translation do
|
||||
permit_params :locale, :key, :value
|
||||
|
||||
index do
|
||||
column :locale
|
||||
column :key
|
||||
actions
|
||||
end
|
||||
|
||||
show do |t|
|
||||
h3 t.locale + ' - ' + t.key
|
||||
section do
|
||||
simple_format t.value
|
||||
end
|
||||
end
|
||||
|
||||
form do |f|
|
||||
f.inputs do
|
||||
f.input :locale
|
||||
|
|
|
@ -151,7 +151,7 @@ it more readable or agreable."
|
|||
tags:
|
||||
index:
|
||||
title: Tags
|
||||
threshold: used more than %{threshold} times
|
||||
threshold: Tags used more than %{threshold} times
|
||||
show:
|
||||
title: Tag
|
||||
links: See also
|
||||
|
|
|
@ -164,7 +164,7 @@ l’événement pour la rendre plus complète, plus lisible ou plus attrayante."
|
|||
tags:
|
||||
index:
|
||||
title: Mots-clés
|
||||
threshold: utilisés plus de %{threshold} fois
|
||||
threshold: Mots-clés utilisés plus de %{threshold} fois
|
||||
show:
|
||||
title: Mot-clé
|
||||
links: Voir aussi
|
||||
|
|
Loading…
Reference in New Issue