diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb
index a7c46d1..7957a95 100644
--- a/app/controllers/archives_controller.rb
+++ b/app/controllers/archives_controller.rb
@@ -17,14 +17,14 @@ class ArchivesController < ApplicationController
end
end
cats = @categories.collect do |cat|
- archives = ArchiveFile.where(:category_id => cat["id"]).collect do |archive|
+ archives = ArchiveFile.where(:category_id => cat["id"]).order_by(:sort_number=>'asc').collect do |archive|
statuses = archive.statuses_with_classname.collect do |status|
{
"status" => status["name"],
"status-class" => "status-#{status['classname']}"
}
end
- files = archive.archive_file_multiples.collect do |file|
+ files = archive.archive_file_multiples.order_by(:sort_number=>'asc').collect do |file|
{
"file-name" => file.file_title,
"file-type" => file.file.file.extension.downcase,
diff --git a/app/views/admin/archive_files/_form_file.html.erb b/app/views/admin/archive_files/_form_file.html.erb
index 0f2e426..0d020f9 100644
--- a/app/views/admin/archive_files/_form_file.html.erb
+++ b/app/views/admin/archive_files/_form_file.html.erb
@@ -21,7 +21,7 @@
- <% I18n.available_locales.each_with_index do |locale, i| %>
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
<%= locale %>">
<%= f.fields_for :file_title_translations do |f| %>
<%= f.text_field locale, :class => "input-medium", placeholder: t('file.name'), :value => (form_file.file_title_translations[locale] rescue nil) %>
@@ -38,7 +38,7 @@