Mercurial > hg > soundsoftware-site
comparison app/views/repositories/_dir_list_content.rhtml @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 051f544170fe |
children | 753f1380d6bc |
comparison
equal
deleted
inserted
replaced
245:051f544170fe | 441:cbce1fd3b1b7 |
---|---|
1 <% @entries.each do |entry| %> | 1 <% @entries.each do |entry| %> |
2 <% tr_id = Digest::MD5.hexdigest(entry.path) | 2 <% tr_id = Digest::MD5.hexdigest(entry.path) |
3 depth = params[:depth].to_i %> | 3 depth = params[:depth].to_i %> |
4 <% ent_path = replace_invalid_utf8(entry.path) %> | 4 <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> |
5 <% ent_name = replace_invalid_utf8(entry.name) %> | 5 <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> |
6 <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> | 6 <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> |
7 <td style="padding-left: <%=18 * depth%>px;" class="filename"> | 7 <td style="padding-left: <%=18 * depth%>px;" class="<%= |
8 @repository.report_last_commit ? "filename" : "filename_no_report" %>";> | |
8 <% if entry.is_dir? %> | 9 <% if entry.is_dir? %> |
9 <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}, | 10 <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}, |
10 :method => :get, | 11 :method => :get, |
11 :update => { :success => tr_id }, | 12 :update => { :success => tr_id }, |
12 :position => :after, | 13 :position => :after, |
17 {:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev}, | 18 {:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev}, |
18 :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%> | 19 :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%> |
19 </td> | 20 </td> |
20 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> | 21 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> |
21 <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> | 22 <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> |
23 <% if @repository.report_last_commit %> | |
22 <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td> | 24 <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td> |
23 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> | 25 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> |
24 <td class="author"><%= changeset.nil? ? h(replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td> | 26 <td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td> |
25 <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td> | 27 <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td> |
28 <% end %> | |
26 </tr> | 29 </tr> |
27 <% end %> | 30 <% end %> |