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.rhtml @ 897:b293eb7e5c94
History | View | Annotate | Download (1.3 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 |
<p><%= render :partial => 'link_to_functions' %></p> |
| 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 %>
|
| 17 |
<% syntax_highlight(@path, to_utf8(@annotate.content)).each_line do |line| %>
|
| 18 |
<% revision = @annotate.revisions[line_num-1] %>
|
| 19 |
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> |
| 20 |
<th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th> |
| 21 |
<td class="revision"> |
| 22 |
<%= (revision.identifier ? link_to_revision(revision, @project) : format_revision(revision)) if revision %></td> |
| 23 |
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td> |
| 24 |
<td class="line-code"><pre><%= line %></pre></td> |
| 25 |
</tr>
|
| 26 |
<% line_num += 1 %>
|
| 27 |
<% end %>
|
| 28 |
</tbody>
|
| 29 |
</table>
|
| 30 |
</div>
|
| 31 |
|
| 32 |
<% html_title(l(:button_annotate)) -%>
|
| 33 |
|
| 34 |
<% content_for :header_tags do %>
|
| 35 |
<%= stylesheet_link_tag 'scm' %>
|
| 36 |
<% end %>
|