<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
<%= render :partial => 'navigation' %>
<%= render :partial => 'link_to_functions' %> <% if @annotate %> <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
<% line_num = 1; previous_revision = nil %> <% syntax_highlight_lines(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each do |line| %> <% revision = @annotate.revisions[line_num - 1] %> <% previous_annot = @annotate.previous_annotations[line_num - 1] %> <% if @has_previous %> <% end %> <% if line == "\n" or line == "\r\n" %> <% else %> <% end %> <% line_num += 1; previous_revision = revision %> <% end %>
<% if revision && revision != previous_revision %> <%= revision.identifier ? link_to_revision(revision, @repository) : format_revision(revision) %> <% end %> <% if revision && revision != previous_revision %> <% author = Redmine::CodesetUtil.to_utf8(revision.author.to_s, @repository.repo_log_encoding) %> <%= author.split('<').first %> <% end %> <% if previous_annot && revision && revision != previous_revision %> <%= link_to '', {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(previous_annot.split[1] || @path), :rev => previous_annot.split[0] }, :title => l(:label_view_previous_annotation), :class => 'icon icon-history' %> <% end %>
<%= line.html_safe %>
<% else %>

<%= @error_message %>

<% end %> <% html_title(l(:button_annotate)) -%> <% content_for :header_tags do %> <%= stylesheet_link_tag 'scm' %> <% end %>