您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

annotate.html.erb 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <div class="contextual">
  2. <%= link_to(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit') %>
  3. <%= link_to(l(:label_history),
  4. {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
  5. </div>
  6. <%= wiki_page_breadcrumb(@page) %>
  7. <%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)],
  8. [l(:label_history), history_project_wiki_page_path(@page.project, @page.title)],
  9. "#{l(:label_version)} #{@annotate.content.version}" %>
  10. <p>
  11. <em><%= @annotate.content.author ? link_to_user(@annotate.content.author) : l(:label_user_anonymous)
  12. %>, <%= format_time(@annotate.content.updated_on) %> </em><br />
  13. <%= @annotate.content.comments %>
  14. </p>
  15. <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
  16. <table class="filecontent annotate">
  17. <tbody>
  18. <% line_num = 1; prev_version = nil %>
  19. <% @annotate.lines.each do |line| -%>
  20. <tr class="bloc-<%= colors[line[0]] %>">
  21. <th class="line-num"><%= line_num %></th>
  22. <td class="revision"><%= link_to line[0], :controller => 'wiki',
  23. :action => 'show', :project_id => @project,
  24. :id => @page.title, :version => line[0] unless prev_version == line[0] %></td>
  25. <td class="author"><%= line[1] unless prev_version == line[0] %></td>
  26. <td class="line-code"><pre><%= line[2] %></pre></td>
  27. </tr>
  28. <% line_num += 1; prev_version = line[0] %>
  29. <% end -%>
  30. </tbody>
  31. </table>
  32. <% content_for :header_tags do %>
  33. <%= stylesheet_link_tag 'scm' %>
  34. <% end %>