annotate app/views/wiki/annotate.html.erb @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +0100
parents 261b3d9a4903
children
rev   line source
Chris@0 1 <div class="contextual">
chris@37 2 <%= link_to(l(:button_edit), {:action => 'edit', :id => @page.title}, :class => 'icon icon-edit') %>
Chris@909 3 <%= link_to(l(:label_history),
Chris@909 4 {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
Chris@0 5 </div>
Chris@0 6
Chris@909 7 <%= wiki_page_breadcrumb(@page) %>
Chris@909 8
Chris@1464 9 <%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)],
Chris@1464 10 [l(:label_history), history_project_wiki_page_path(@page.project, @page.title)],
Chris@1464 11 "#{l(:label_version)} #{@annotate.content.version}" %>
Chris@0 12
Chris@0 13 <p>
Chris@1464 14 <em><%= @annotate.content.author ? link_to_user(@annotate.content.author) : l(:label_user_anonymous)
Chris@1464 15 %>, <%= format_time(@annotate.content.updated_on) %> </em><br />
Chris@1464 16 <%=h @annotate.content.comments %>
Chris@0 17 </p>
Chris@0 18
Chris@0 19 <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
Chris@0 20
Chris@0 21 <table class="filecontent annotate">
Chris@0 22 <tbody>
Chris@0 23 <% line_num = 1 %>
Chris@0 24 <% @annotate.lines.each do |line| -%>
Chris@0 25 <tr class="bloc-<%= colors[line[0]] %>">
Chris@0 26 <th class="line-num"><%= line_num %></th>
Chris@909 27 <td class="revision"><%= link_to line[0], :controller => 'wiki',
Chris@909 28 :action => 'show', :project_id => @project,
Chris@909 29 :id => @page.title, :version => line[0] %></td>
Chris@0 30 <td class="author"><%= h(line[1]) %></td>
Chris@0 31 <td class="line-code"><pre><%=h line[2] %></pre></td>
Chris@0 32 </tr>
Chris@0 33 <% line_num += 1 %>
Chris@0 34 <% end -%>
Chris@0 35 </tbody>
Chris@0 36 </table>
Chris@0 37
Chris@0 38 <% content_for :header_tags do %>
Chris@0 39 <%= stylesheet_link_tag 'scm' %>
Chris@0 40 <% end %>