Remove i18n_variable for views
This commit is contained in:
1 parent
acb7fe0dea
commit
5713df685d
32 files changed
+64
-63
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<tr id="asset_<%= asset.id %>" class="with_action">
|
||||
<td><%= check_box_tag 'to_delete[]', asset.id, false, :class => "checkbox_in_list" %></td>
|
||||
<td><%= asset.title.i18n_variable[I18n.locale] rescue nil %></td>
|
||||
<td><%= asset.title rescue nil %></td>
|
||||
<td>
|
||||
<i class="icons-picture img-peview" rel="popover" data-content="<img src='<%= asset.data.url %>' />" data-original-title="<%= asset.data.filename %>"></i>
|
||||
<div class="quick-edit">
|
||||
@@ -12,7 +12,7 @@
|
||||
</td>
|
||||
<td><%= asset.data.file.content_type %></td>
|
||||
<td><%= number_to_human_size(asset.data.file.file_length) %></td>
|
||||
<td><%= asset.description.i18n_variable[I18n.locale] rescue nil %></td>
|
||||
<td><%= asset.description rescue nil %></td>
|
||||
<td>
|
||||
<div class="label-group">
|
||||
<div class="label-td">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<div class="control-group">
|
||||
<label for="title" class="control-label"><%= t 'admin.title' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :i18n_variable, (@asset.new_record? ? @asset.build_i18n_variable : @asset.i18n_variable) do |f| %>
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= content_tag :label do -%>
|
||||
<div>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class => "input-large" %>
|
||||
<%= f.text_field locale, :class => "input-large", :value => (@asset.title_translations[locale] rescue nil) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= f.label :category, t('admin.category') %></label>
|
||||
<div class="controls">
|
||||
<%= f.select :asset_category_id, @asset_categories.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-large" %>
|
||||
<%= f.select :asset_category_id, @asset_categories.collect{|t| [ t.title, t.id ]}, {}, :class => "input-large" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
<div class="control-group">
|
||||
<label for="title" class="control-label error"><%= t 'admin.title' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title, (@asset.new_record? ? @asset.build_title : @asset.title) do |f| %>
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<div>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= content_tag :label do -%>
|
||||
<div>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class => "input-large" %>
|
||||
<%= f.text_field locale, :class => "input-large", :value => (@asset.title_translations[locale] rescue nil) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -28,13 +28,13 @@
|
||||
<div class="control-group">
|
||||
<label for="description" class="control-label error"><%= t 'admin.description' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :description, (@asset.new_record? ? @asset.build_description : @asset.description) do |f| %>
|
||||
<%= f.fields_for :description_translations do |f| %>
|
||||
<div>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<%= content_tag :label do -%>
|
||||
<div>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class => "input-large" %>
|
||||
<%= f.text_field locale, :class => "input-large", :value => (@asset.title_translations[locale] rescue nil) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in new issue
Block a user