diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 234d09d1c..ee524ec55 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -72,7 +72,7 @@ class FilesController < ApplicationController end if order_by.count == 1 - sort += "#{Attachment.table_name}.#{attribute} desc " + sort += "#{Attachment.table_name}.#{attribute} asc " elsif order_by.count == 2 sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " end @@ -83,7 +83,7 @@ class FilesController < ApplicationController end @containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)] - @containers += @project.versions.includes(:attachments).reorder(sort).all.sort + @containers += @project.versions.includes(:attachments).reorder(sort).all show_attachments @containers diff --git a/app/views/files/_show_all_attachment.html.erb b/app/views/files/_show_all_attachment.html.erb index 3520d5576..c32280c2c 100644 --- a/app/views/files/_show_all_attachment.html.erb +++ b/app/views/files/_show_all_attachment.html.erb @@ -17,7 +17,7 @@ <%= sort_header_tag('filename', :caption => l(:field_filename), :scope => "col", :id => "vzebra-adventure",:class => "tableth") %> <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc', :scope => "col", :id => "vzebra-children",:class => "tableth") %> <%= sort_header_tag('attach_type', :caption => l(:attachment_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-attachmenttype",:class => "tableth") %> - <%= sort_header_tag('content_type', :caption => l(:attachment_sufix_browse), :default_order => 'desc', :scope => "col", :id => "vzebra-contenttype",:class => "tableth") %> + <%= content_tag('th', l(:attachment_sufix_browse), id: 'vzebra-contenttype', class: 'tableth', style: 'color: black')%> <%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense",:class => "tableth") %> <%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action",:class => "tableth") %> <%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children",:class => "tableth") %>