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 %>
-
-
-
- <%= (latest_changes.author) if latest_changes && latest_changes.author %>
-
- |
-
- <%= distance_of_time_in_words(latest_changes.time, Time.now) if latest_changes && latest_changes.time %>
- |
-
-
+
+
+
+
+ <%= (latest_changes.author) if latest_changes && latest_changes.author %>
+
+ |
+
+ <%= distance_of_time_in_words(latest_changes.time, Time.now) if latest_changes && latest_changes.time %>
+ |
+
<%# end %>
<% end %>