comparison app/views/repositories/.svn/text-base/annotate.rhtml.svn-base @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children af80e5618e9b
comparison
equal deleted inserted replaced
-1:000000000000 0:513646585e45
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(format_revision(revision.identifier), :action => 'revision', :id => @project, :rev => revision.identifier) : format_revision(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 %>