" class="list_item">
<% if form_file.new_record? %> <%= f.file_field :file, class: "s_grid_2", onchange:"var temp = o.filepathSplitter(this.value);temp=temp[temp.length - 1];this.parentNode.getElementsByTagName('label')[0].innerHTML = temp;var inputs = this.parentNode.parentNode.parentNode.getElementsByClassName('title_field');inputs[0].value = temp;inputs[1].value = temp;" %> <% else %> <%= link_to(image_tag(check_file_type(form_file.file.url)), form_file.file.url, :class => "file", "target" => "_blank", "title" => form_file.title) %> <% end %>
<% @site_in_use_locales.each_with_index do |locale, i| %> <% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %> <% data = "data-language=" + locale %> <%= data %>> <%= f.fields_for :file_title_translations do |f| %> <%= f.text_field locale, class: 's_grid_4 title_field', placeholder: I18nVariable.from_locale(locale), value: (form_file.file_title_translations[locale] rescue nil) %> <% end %> <%= data %>> <%= f.fields_for :file_description_translations do |f| %> <%= f.text_field locale, class: 's_grid_4', placeholder: I18nVariable.from_locale(locale), value: (form_file.file_description_translations[locale] rescue nil) %> <% end %> <% end %> <% if form_file.new_record? %> <% else %> <%= f.hidden_field :id %> <%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %> <% end %> <%= form_file.file.file ? ( link_to '', form_file.file.url, {:class => 'icon-eye-open', :target => '_blank', :title => t(:view)} ) : '' %>