annotate.rhtml
36 lines
| 1.3 KiB
| text/html+ruby
|
RhtmlLexer
|
r2735 | <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %> | ||
<div class="contextual"> | ||||
<%= render :partial => 'navigation' %> | ||||
</div> | ||||
<h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> | ||||
|
r934 | |||
|
r2165 | <p><%= render :partial => 'link_to_functions' %></p> | ||
|
r934 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> | ||
<div class="autoscroll"> | ||||
|
r3471 | <table class="filecontent annotate syntaxhl"> | ||
|
r934 | <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] %>"> | ||||
|
r2463 | <th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th> | ||
|
r934 | <td class="revision"> | ||
|
r4493 | <%= (revision.identifier ? link_to_revision(revision, @project) : format_revision(revision)) if revision %></td> | ||
|
r1194 | <td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td> | ||
|
r934 | <td class="line-code"><pre><%= line %></pre></td> | ||
</tr> | ||||
<% line_num += 1 %> | ||||
<% end %> | ||||
|
r979 | </tbody> | ||
|
r934 | </table> | ||
</div> | ||||
|
r1019 | <% html_title(l(:button_annotate)) -%> | ||
|
r934 | <% content_for :header_tags do %> | ||
<%= stylesheet_link_tag 'scm' %> | ||||
<% end %> | ||||