annotate app/views/repositories/_dir_list_content.html.erb @ 908:c6c2cbd0afee redmine-1.3

Rename .rhtml files to .html.erb in preparation for merge
author Chris Cannam
date Fri, 24 Feb 2012 18:36:29 +0000
parents app/views/repositories/_dir_list_content.rhtml@cbce1fd3b1b7
children cbb26bc654de
rev   line source
Chris@0 1 <% @entries.each do |entry| %>
Chris@0 2 <% tr_id = Digest::MD5.hexdigest(entry.path)
Chris@0 3 depth = params[:depth].to_i %>
Chris@441 4 <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %>
Chris@441 5 <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
Chris@0 6 <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
Chris@441 7 <td style="padding-left: <%=18 * depth%>px;" class="<%=
Chris@441 8 @repository.report_last_commit ? "filename" : "filename_no_report" %>";>
Chris@0 9 <% if entry.is_dir? %>
Chris@245 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},
Chris@245 11 :method => :get,
Chris@0 12 :update => { :success => tr_id },
Chris@0 13 :position => :after,
Chris@0 14 :success => "scmEntryLoaded('#{tr_id}')",
Chris@0 15 :condition => "scmEntryClick('#{tr_id}')"%>">&nbsp</span>
Chris@0 16 <% end %>
Chris@245 17 <%= link_to h(ent_name),
Chris@245 18 {:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :path => to_path_param(ent_path), :rev => @rev},
Chris@245 19 :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
Chris@0 20 </td>
Chris@0 21 <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
Chris@245 22 <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
Chris@441 23 <% if @repository.report_last_commit %>
Chris@119 24 <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td>
Chris@0 25 <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
Chris@441 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>
Chris@0 27 <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td>
Chris@441 28 <% end %>
Chris@0 29 </tr>
Chris@0 30 <% end %>