##// END OF EJS Templates
Clickable/linkable line #'s while browsing the repo or viewing a text file (#2835)....
Jean-Philippe Lang -
r2463:4c28291a1971
parent child
Show More
@@ -3,7 +3,7
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>
@@ -11,7 +11,7
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>
General Comments 0
You need to be logged in to leave comments. Login now