2007-12-02 23:58:02 +03:00
|
|
|
<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
|
|
|
|
|
|
|
|
<% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
|
|
|
|
|
|
|
|
<div class="autoscroll">
|
|
|
|
<table class="filecontent annotate CodeRay">
|
|
|
|
<tbody>
|
|
|
|
<% line_num = 1 %>
|
|
|
|
<% syntax_highlight(@path, to_utf8(@annotate.content)).each_line do |line| %>
|
|
|
|
<% revision = @annotate.revisions[line_num-1] %>
|
|
|
|
<tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>">
|
|
|
|
<th class="line-num"><%= line_num %></th>
|
|
|
|
<td class="revision">
|
|
|
|
<%= (revision.identifier ? link_to(revision.identifier, :action => 'revision', :id => @project, :rev => revision.identifier) : revision.revision) if revision %></td>
|
2008-03-08 16:46:07 +03:00
|
|
|
<td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td>
|
2007-12-02 23:58:02 +03:00
|
|
|
<td class="line-code"><pre><%= line %></pre></td>
|
|
|
|
</tr>
|
|
|
|
<% line_num += 1 %>
|
|
|
|
<% end %>
|
2007-12-14 20:47:30 +03:00
|
|
|
</tbody>
|
2007-12-02 23:58:02 +03:00
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:button_annotate)) -%>
|
|
|
|
|
2007-12-02 23:58:02 +03:00
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
|
|
|
<% end %>
|