@@ -1,11 +1,11 | |||
|
1 | 1 | <div class="autoscroll"> |
|
2 | 2 | <table class="filecontent CodeRay"> |
|
3 | 3 | <tbody> |
|
4 | 4 | <% line_num = 1 %> |
|
5 | 5 | <% syntax_highlight(filename, to_utf8(content)).each_line do |line| %> |
|
6 | <tr><th class="line-num" id="L<%= line_num %>"><%= line_num %></th><td class="line-code"><pre><%= line %></pre></td></tr> | |
|
6 | <tr><th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th><td class="line-code"><pre><%= line %></pre></td></tr> | |
|
7 | 7 | <% line_num += 1 %> |
|
8 | 8 | <% end %> |
|
9 | 9 | </tbody> |
|
10 | 10 | </table> |
|
11 | 11 | </div> |
@@ -1,30 +1,30 | |||
|
1 | 1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> |
|
2 | 2 | |
|
3 | 3 | <p><%= render :partial => 'link_to_functions' %></p> |
|
4 | 4 | |
|
5 | 5 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> |
|
6 | 6 | |
|
7 | 7 | <div class="autoscroll"> |
|
8 | 8 | <table class="filecontent annotate CodeRay"> |
|
9 | 9 | <tbody> |
|
10 | 10 | <% line_num = 1 %> |
|
11 | 11 | <% syntax_highlight(@path, to_utf8(@annotate.content)).each_line do |line| %> |
|
12 | 12 | <% revision = @annotate.revisions[line_num-1] %> |
|
13 | 13 | <tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> |
|
14 | <th class="line-num"><%= line_num %></th> | |
|
14 | <th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th> | |
|
15 | 15 | <td class="revision"> |
|
16 | 16 | <%= (revision.identifier ? link_to(format_revision(revision.identifier), :action => 'revision', :id => @project, :rev => revision.identifier) : format_revision(revision.revision)) if revision %></td> |
|
17 | 17 | <td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td> |
|
18 | 18 | <td class="line-code"><pre><%= line %></pre></td> |
|
19 | 19 | </tr> |
|
20 | 20 | <% line_num += 1 %> |
|
21 | 21 | <% end %> |
|
22 | 22 | </tbody> |
|
23 | 23 | </table> |
|
24 | 24 | </div> |
|
25 | 25 | |
|
26 | 26 | <% html_title(l(:button_annotate)) -%> |
|
27 | 27 | |
|
28 | 28 | <% content_for :header_tags do %> |
|
29 | 29 | <%= stylesheet_link_tag 'scm' %> |
|
30 | 30 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now