From 449bdf2225d20c293b4944214b79fdbbb0e2de65 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 20 Apr 2016 16:40:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repositories/_dir_list_content.html.erb | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb index b04e40905..79ed44b99 100644 --- a/app/views/repositories/_dir_list_content.html.erb +++ b/app/views/repositories/_dir_list_content.html.erb @@ -1,9 +1,10 @@ <% @entries.each do |entry| %> <% tr_id = Digest::MD5.hexdigest(entry.path) depth = params[:depth].to_i %> - <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> - <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> - <% latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_name) %> + <% sub_path = entry.path[0] == "/" ? entry.path.sub("/", "") : entry.path %> + <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(sub_path) %> + <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> + <% latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_path) %> @@ -15,35 +16,36 @@ :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev, + :latest_changes => latest_changes, :depth => (depth + 1), :parent_id => tr_id)) %>');">  <% end %> - "> - <%= h(ent_name) %> - + + + <%#= h(ent_name), :class => "(entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%> -<%#= link_to h(ent_name), +<%= link_to h(ent_name), {:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev}, :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%> <%# if @repository.report_last_commit %> - - - - - - - - - - - +
+ + + + + + + + + +
<%# end %> <% end %>