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

28 lines
698 B
Ruby
Raw Normal View History

ActiveAdmin.register_page "Dashboard" do
menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }
content title: proc{ I18n.t("active_admin.dashboard") } do
2013-12-10 23:49:01 +01:00
columns do
column do
panel "Contributeurs" do
ul do
User.all.map do |user|
li link_to("#{user.firstname} #{user.lastname} (#{user.login})", user)
2013-12-10 23:49:01 +01:00
end
end
end
end
2013-12-10 23:49:01 +01:00
column do
panel "Commentaires" do
2013-12-10 23:49:01 +01:00
ul do
ActiveAdmin::Comment.all.map do |comment|
li link_to(comment.author.email, admin_admin_user_path(comment.author))
2013-12-10 23:49:01 +01:00
end
end
end
end
end
end
end