annotate.html.erb
46 lines
| 1.7 KiB
| text/plain
|
TextLexer
|
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 | |||
|
r9686 | <%= render :partial => 'link_to_functions' %> | ||
|
r2165 | |||
|
r934 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> | ||
<div class="autoscroll"> | ||||
|
r3471 | <table class="filecontent annotate syntaxhl"> | ||
|
r934 | <tbody> | ||
|
r9922 | <% line_num = 1; previous_revision = nil %> | ||
|
r8868 | <% syntax_highlight_lines(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each do |line| %> | ||
|
r7737 | <% revision = @annotate.revisions[line_num - 1] %> | ||
|
r11628 | <tr id="L<%= line_num %>" class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> | ||
<th class="line-num"><a href="#L<%= line_num %>"><%= line_num %></a></th> | ||||
|
r7737 | <td class="revision"> | ||
|
r11908 | <% if revision && revision != previous_revision %> | ||
<%= revision.identifier ? | ||||
link_to_revision(revision, @repository) : format_revision(revision) %> | ||||
<% end %> | ||||
</td> | ||||
<td class="author"> | ||||
<% if revision && revision != previous_revision %> | ||||
|
r11926 | <% author = Redmine::CodesetUtil.to_utf8(revision.author.to_s, | ||
@repository.repo_log_encoding) %> | ||||
<%= author.split('<').first %> | ||||
|
r11908 | <% end %> | ||
</td> | ||||
|
r8868 | <td class="line-code"><pre><%= line.html_safe %></pre></td> | ||
|
r7737 | </tr> | ||
|
r9922 | <% line_num += 1; previous_revision = revision %> | ||
|
r934 | <% end %> | ||
|
r979 | </tbody> | ||
|
r934 | </table> | ||
</div> | ||||
|
r1019 | <% html_title(l(:button_annotate)) -%> | ||
|
r934 | <% content_for :header_tags do %> | ||
<%= stylesheet_link_tag 'scm' %> | ||||
<% end %> | ||||