From 0ed9fab16f5d21b82618c6f40fe0ef7f6ee80f15 Mon Sep 17 00:00:00 2001 From: gonglexin <18008490802@163.com> Date: Thu, 23 Oct 2014 15:29:33 +0800 Subject: [PATCH] =?UTF-8?q?#994=20=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E4=B8=8B=E8=BD=BD=E6=8E=92=E5=BA=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 4 ++-- app/views/files/_show_all_attachment.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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") %>