<% # 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) %>
<% extra_data = f.object.new_record? ? {placeholder: f.object.sort_number, title: f.object.sort_number, value: ''} : {} %> <%= f.number_field :sort_number, extra_data %>
<%= 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 :description_translations do |f| %> <%= f.text_area locale, class: "ckeditor input-block-level", placeholder: t("archive.description"), value: (@archive_file.description_translations[locale] rescue nil) %> <% end %>
<%= t(:add) %>
<% 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', :locals => {:f => f, :i => i,:form_file => archive_file_multiple} %> <% end %> <% end %>
<% end %>
<%=t("archive.drag_file_to_here")%>
<%= 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 %>