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

33 lines
831 B
Ruby
Raw Normal View History

2014-07-18 17:01:51 +02:00
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 link_to 'Moderateurs', :admin_users do
2013-12-10 23:49:01 +01:00
ul do
User.all.map do |user|
li "#{user.firstname} #{user.lastname} (#{user.login})"
2013-12-10 23:49:01 +01:00
end
end
end
end
2013-12-10 23:49:01 +01:00
column do
2014-07-18 17:01:51 +02:00
panel 'Commentaires' do
2013-12-10 23:49:01 +01:00
ul do
ActiveAdmin::Comment.all.map do |comment|
2014-07-18 17:01:51 +02:00
li link_to(comment.author.email, admin_comment_path(comment))
2013-12-10 23:49:01 +01:00
end
end
end
end
end
2015-10-03 13:57:10 +02:00
panel 'Git' do
link_to(`git log -n 1 --oneline`,
'//git.framasoft.org/agenda-libre/agenda-libre-ruby')
2014-07-18 23:20:30 +02:00
end
2013-12-10 23:49:01 +01:00
end
end