2014-07-18 17:01:51 +02:00
|
|
|
ActiveAdmin.register_page 'Dashboard' do
|
2014-08-06 14:47:47 +02:00
|
|
|
menu priority: 1, label: proc { I18n.t('active_admin.dashboard') }
|
2013-11-14 17:07:48 +01:00
|
|
|
|
2014-08-06 14:47:47 +02:00
|
|
|
content title: proc { I18n.t('active_admin.dashboard') } do
|
2013-12-10 23:49:01 +01:00
|
|
|
columns do
|
|
|
|
column do
|
2014-07-18 17:05:05 +02:00
|
|
|
panel 'Moderateurs' do
|
2013-12-10 23:49:01 +01:00
|
|
|
ul do
|
|
|
|
User.all.map do |user|
|
2014-08-06 14:47:47 +02:00
|
|
|
li link_to("#{user.firstname} #{user.lastname} (#{user.login})",
|
|
|
|
user)
|
2013-12-10 23:49:01 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2013-11-14 17:07:48 +01:00
|
|
|
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
|
2013-12-28 15:45:21 +01:00
|
|
|
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
|
2014-08-09 19:07:49 +02:00
|
|
|
para %(Actuellement:
|
2014-08-06 14:47:47 +02:00
|
|
|
#{link_to(`git rev-parse --short HEAD`,
|
2015-10-03 13:57:10 +02:00
|
|
|
'//git.framasoft.org/agenda-libre/agenda-libre-ruby')})
|
2014-11-05 21:25:18 +01:00
|
|
|
.html_safe
|
2014-07-18 23:20:30 +02:00
|
|
|
end
|
2013-12-10 23:49:01 +01:00
|
|
|
end
|
2013-11-14 17:07:48 +01:00
|
|
|
end
|