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