Permalink
Browse files

Customizing the show admin view

  • Loading branch information...
1 parent 615e285 commit 77f498a237f68032a8a71a63ff2669756164ed49 @akitaonrails committed Jul 14, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 app/admin/articles.rb
View
@@ -7,6 +7,22 @@
default_actions
end
+ show do |article|
+ attributes_table do
+ row :slug
+ I18n.available_locales.each do |locale|
+ h3 I18n.t(locale, scope: ["translation"])
+ div do
+ h4 article.translations.where(locale: locale).first.title
+ end
+ div do
+ article.translations.where(locale: locale).first.body_html.html_safe
+ end
+ end
+ end
+ active_admin_comments
+ end
+
form do |f|
f.input :slug
f.globalize_inputs :translations do |lf|

0 comments on commit 77f498a

Please sign in to comment.