Put back I18n for file_upload

This commit is contained in:
Christophe Vilayphiou 2012-05-17 19:40:30 +08:00
parent 606050627e
commit 2f7d561310
3 changed files with 29 additions and 4 deletions

View File

@ -0,0 +1,11 @@
module Admin::AssetHelper
def show_all_fields(asset, field)
a = []
@site_valid_locales.each do |locale|
a << asset.send(field)[locale] rescue nil
end
a.join(' - ')
end
end

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,14 @@
<div class="controls">
<%= f.fields_for :title, (@asset.new_record? ? @asset.build_title : @asset.title) do |f| %>
<div>
<%= f.text_field I18n.locale, :class => "input-large" %>
<% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<div>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class => "input-large" %>
</div>
<% end %>
<% end %>
</div>
<% end %>
</div>
@ -23,7 +30,14 @@
<div class="controls">
<%= f.fields_for :description, (@asset.new_record? ? @asset.build_description : @asset.description) do |f| %>
<div>
<%= f.text_field I18n.locale, :class => "input-large" %>
<% @site_valid_locales.each do |locale| %>
<%= content_tag :label do -%>
<div>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class => "input-large" %>
</div>
<% end %>
<% end %>
</div>
<% end %>
</div>