To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / repositories / _dir_list_content.html.erb @ 1018:d78b06240b73
History | View | Annotate | Download (2.19 KB)
| 1 | 0:513646585e45 | Chris | <% @entries.each do |entry| %>
|
|---|---|---|---|
| 2 | <% tr_id = Digest::MD5.hexdigest(entry.path)
|
||
| 3 | depth = params[:depth].to_i %>
|
||
| 4 | 441:cbce1fd3b1b7 | Chris | <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %>
|
| 5 | <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
|
||
| 6 | 0:513646585e45 | Chris | <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> |
| 7 | 441:cbce1fd3b1b7 | Chris | <td style="padding-left: <%=18 * depth%>px;" class="<%= |
| 8 | @repository.report_last_commit ? "filename" : "filename_no_report" %>";> |
||
| 9 | 0:513646585e45 | Chris | <% if entry.is_dir? %>
|
| 10 | 909:cbb26bc654de | Chris | <span class="expander" onclick="<%= remote_function( |
| 11 | :url => {
|
||
| 12 | :action => 'show',
|
||
| 13 | :id => @project,
|
||
| 14 | :path => to_path_param(ent_path),
|
||
| 15 | :rev => @rev,
|
||
| 16 | :depth => (depth + 1),
|
||
| 17 | :parent_id => tr_id
|
||
| 18 | },
|
||
| 19 | 245:051f544170fe | Chris | :method => :get,
|
| 20 | 0:513646585e45 | Chris | :update => { :success => tr_id },
|
| 21 | :position => :after,
|
||
| 22 | :success => "scmEntryLoaded('#{tr_id}')",
|
||
| 23 | 909:cbb26bc654de | Chris | :condition => "scmEntryClick('#{tr_id}')"
|
| 24 | ) %>"> </span> |
||
| 25 | 0:513646585e45 | Chris | <% end %>
|
| 26 | 245:051f544170fe | Chris | <%= link_to h(ent_name),
|
| 27 | 1018:d78b06240b73 | chris | {:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :path => to_path_param(ent_path), :rev => @rev},
|
| 28 | 245:051f544170fe | Chris | :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
|
| 29 | 0:513646585e45 | Chris | </td>
|
| 30 | <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> |
||
| 31 | 245:051f544170fe | Chris | <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
|
| 32 | 441:cbce1fd3b1b7 | Chris | <% if @repository.report_last_commit %>
|
| 33 | 3:7c48bad7d85d | Chris | <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td> |
| 34 | 0:513646585e45 | Chris | <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> |
| 35 | 909:cbb26bc654de | Chris | <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> |
| 36 | 0:513646585e45 | Chris | <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td> |
| 37 | 441:cbce1fd3b1b7 | Chris | <% end %>
|
| 38 | 0:513646585e45 | Chris | </tr>
|
| 39 | <% end %> |