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 / annotate.html.erb @ 1531:ae8145b28b2b
History | View | Annotate | Download (1.74 KB)
| 1 |
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
|---|---|
| 2 |
|
| 3 |
<div class="contextual"> |
| 4 |
<%= render :partial => 'navigation' %>
|
| 5 |
</div>
|
| 6 |
|
| 7 |
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> |
| 8 |
|
| 9 |
<%= render :partial => 'link_to_functions' %>
|
| 10 |
|
| 11 |
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
| 12 |
|
| 13 |
<div class="autoscroll"> |
| 14 |
<table class="filecontent annotate syntaxhl"> |
| 15 |
<tbody>
|
| 16 |
<% line_num = 1; previous_revision = nil %>
|
| 17 |
<% syntax_highlight_lines(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each do |line| %>
|
| 18 |
<% revision = @annotate.revisions[line_num - 1] %>
|
| 19 |
<tr id="L<%= line_num %>" class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> |
| 20 |
<th class="line-num"><a href="#L<%= line_num %>"><%= line_num %></a></th> |
| 21 |
<td class="revision"> |
| 22 |
<% if revision && revision != previous_revision %>
|
| 23 |
<%= revision.identifier ?
|
| 24 |
link_to_revision(revision, @repository) : format_revision(revision) %>
|
| 25 |
<% end %>
|
| 26 |
</td>
|
| 27 |
<td class="author"> |
| 28 |
<% if revision && revision != previous_revision %>
|
| 29 |
<% author = Redmine::CodesetUtil.to_utf8(revision.author.to_s,
|
| 30 |
@repository.repo_log_encoding) %>
|
| 31 |
<%= author.split('<').first %>
|
| 32 |
<% end %>
|
| 33 |
</td>
|
| 34 |
<td class="line-code"><pre><%= line.html_safe %></pre></td> |
| 35 |
</tr>
|
| 36 |
<% line_num += 1; previous_revision = revision %>
|
| 37 |
<% end %>
|
| 38 |
</tbody>
|
| 39 |
</table>
|
| 40 |
</div>
|
| 41 |
|
| 42 |
<% html_title(l(:button_annotate)) -%>
|
| 43 |
|
| 44 |
<% content_for :header_tags do %>
|
| 45 |
<%= stylesheet_link_tag 'scm' %>
|
| 46 |
<% end %>
|