<% # 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 %> <% sort_order = ArchiveSortOrder.first min_sort_number = sort_order.min_sort_number max_sort_number = sort_order.max_sort_number %> <%#= 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 %>

<% if sort_order.sort_order %> <%= t("archive.ascending") %> <% else %> <%= t("archive.decending") %> <% end %> ; <%= t('default') %>: <%= sort_order.get_default_order %>

<%= t('archive.min') %>: <%=min_sort_number%>, <%= t('archive.max') %>: <%=max_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 :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 %>