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="<%=
|
|
|
|
@repository.report_last_commit ? "filename" : "filename_no_report" %>";>
|
2008-06-15 15:40:13 +04:00
|
|
|
<% if entry.is_dir? %>
|
2011-02-22 11:16:05 +03:00
|
|
|
<span class="expander" onclick="<%= remote_function :url => {:action => 'show', :id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id},
|
|
|
|
:method => :get,
|
2007-10-28 18:04:17 +03:00
|
|
|
:update => { :success => tr_id },
|
2007-10-22 21:45:41 +04:00
|
|
|
:position => :after,
|
2007-10-22 23:34:21 +04:00
|
|
|
:success => "scmEntryLoaded('#{tr_id}')",
|
2008-06-15 15:40:13 +04:00
|
|
|
:condition => "scmEntryClick('#{tr_id}')"%>"> </span>
|
|
|
|
<% end %>
|
2011-02-22 11:16:05 +03:00
|
|
|
<%= link_to h(ent_name),
|
|
|
|
{:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :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)}")%>
|
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-02-16 18:43:36 +03:00
|
|
|
<% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
|
2011-05-13 07:55:21 +04:00
|
|
|
<% if @repository.report_last_commit %>
|
2011-01-02 12:45:05 +03:00
|
|
|
<td class="revision"><%= link_to_revision(changeset, @project) if 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>
|
2011-08-02 16:46:31 +04:00
|
|
|
<td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : h(changeset.author) if entry.lastrev %></td>
|
2009-02-21 14:04:50 +03:00
|
|
|
<td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td>
|
2011-05-13 07:55:21 +04:00
|
|
|
<% end %>
|
2007-10-22 21:45:41 +04:00
|
|
|
</tr>
|
|
|
|
<% end %>
|