2007-10-22 21:45:41 +04:00
|
|
|
<% @entries.each do |entry| %>
|
|
|
|
<% tr_id = Digest::MD5.hexdigest(entry.path)
|
|
|
|
depth = params[:depth].to_i %>
|
2011-04-16 10:43:49 +04:00
|
|
|
<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %>
|
|
|
|
<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
|
2010-01-13 20:27:37 +03:00
|
|
|
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
|
2011-05-13 07:55:21 +04:00
|
|
|
<td style="padding-left: <%=18 * depth%>px;" class="<%=
|
2012-07-29 15:33:47 +04:00
|
|
|
@repository.report_last_commit ? "filename" : "filename_no_report" %>">
|
2008-06-15 15:40:13 +04:00
|
|
|
<% if entry.is_dir? %>
|
2012-07-22 17:29:26 +04:00
|
|
|
<span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for(
|
2011-10-20 05:07:10 +04:00
|
|
|
:action => 'show',
|
|
|
|
:id => @project,
|
2012-07-30 05:32:31 +04:00
|
|
|
:repository_id => @repository.identifier_param,
|
2011-10-20 05:07:10 +04:00
|
|
|
:path => to_path_param(ent_path),
|
|
|
|
:rev => @rev,
|
|
|
|
:depth => (depth + 1),
|
2012-07-29 15:34:00 +04:00
|
|
|
:parent_id => tr_id)) %>');"> </span>
|
2008-06-15 15:40:13 +04:00
|
|
|
<% end %>
|
2011-02-22 11:16:05 +03:00
|
|
|
<%= link_to h(ent_name),
|
2012-01-15 22:19:19 +04:00
|
|
|
{:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev},
|
2011-02-22 11:16:05 +03:00
|
|
|
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
2007-10-22 21:45:41 +04:00
|
|
|
</td>
|
2008-01-03 01:41:53 +03:00
|
|
|
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
|
2011-05-13 07:55:21 +04:00
|
|
|
<% if @repository.report_last_commit %>
|
2012-06-10 22:32:09 +04:00
|
|
|
<td class="revision"><%= link_to_revision(entry.changeset, @repository) if entry.changeset %></td>
|
2008-01-03 01:41:53 +03:00
|
|
|
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
|
2012-06-10 23:19:22 +04:00
|
|
|
<td class="author"><%= entry.author %></td>
|
2012-06-10 22:32:09 +04:00
|
|
|
<td class="comments"><%=h truncate(entry.changeset.comments, :length => 50) if entry.changeset %></td>
|
2011-05-13 07:55:21 +04:00
|
|
|
<% end %>
|
2007-10-22 21:45:41 +04:00
|
|
|
</tr>
|
|
|
|
<% end %>
|