<% # encoding: utf-8 %> <% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%= stylesheet_link_tag "lib/fileupload" %> <%= stylesheet_link_tag "lib/main-list" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/bootstrap-fileupload" %> <%= javascript_include_tag "lib/file-type" %> <%= javascript_include_tag "lib/module-area" %> <%= javascript_include_tag "lib/jquery-ui-sortable.min" %> <% end %> <%#= f.error_messages %>
<%= select_category(f, @module_app) %>
<%= f.text_field :sort_number %>
<%= select_tags(f, @module_app) %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
">
<%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t(:title), value: (@archive_file.title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :url_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t(:url), value: (@archive_file.url_translations[locale] rescue nil) %> <% end %>
<% end %>

<%= hidden_field_tag 'archive_file_multiple_field_count', @archive_file.archive_file_multiples.count %> <%= t(:add) %>

<% if @archive_file && !@archive_file.archive_file_multiples.blank? %>
<% @archive_file.archive_file_multiples.desc(:sort_number).each_with_index do |archive_file_multiple, i| %> <%= f.fields_for :archive_file_multiples, archive_file_multiple do |f| %> <%= render :partial => 'form_file', :object => archive_file_multiple, :locals => {:f => f, :i => i} %> <% end %> <% end %>
<% end %>
<%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %> <%= f.submit t('submit'), class: 'btn btn-primary' %> <%= t("archive.back_to_archives") %>
<% content_for :page_specific_javascript do %> <% end %>