annotate app/views/wiki/annotate.rhtml @ 1452:d6b9fd02bb89 feature_36_js_refactoring

Deprecated develoment branch.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 11 Oct 2013 17:01:24 +0100
parents 94944d00e43c
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@37 3 <%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
Chris@0 4 </div>
Chris@0 5
Chris@0 6 <h2><%= @page.pretty_title %></h2>
Chris@0 7
Chris@0 8 <p>
chris@37 9 <%= l(:label_version) %> <%= link_to @annotate.content.version, :action => 'show', :id => @page.title, :version => @annotate.content.version %>
Chris@0 10 <em>(<%= @annotate.content.author ? @annotate.content.author.name : "anonyme" %>, <%= format_time(@annotate.content.updated_on) %>)</em>
Chris@0 11 </p>
Chris@0 12
Chris@0 13 <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
Chris@0 14
Chris@0 15 <table class="filecontent annotate">
Chris@0 16 <tbody>
Chris@0 17 <% line_num = 1 %>
Chris@0 18 <% @annotate.lines.each do |line| -%>
Chris@0 19 <tr class="bloc-<%= colors[line[0]] %>">
Chris@0 20 <th class="line-num"><%= line_num %></th>
chris@37 21 <td class="revision"><%= link_to line[0], :controller => 'wiki', :action => 'show', :project_id => @project, :id => @page.title, :version => line[0] %></td>
Chris@0 22 <td class="author"><%= h(line[1]) %></td>
Chris@0 23 <td class="line-code"><pre><%=h line[2] %></pre></td>
Chris@0 24 </tr>
Chris@0 25 <% line_num += 1 %>
Chris@0 26 <% end -%>
Chris@0 27 </tbody>
Chris@0 28 </table>
Chris@0 29
Chris@0 30 <% content_for :header_tags do %>
Chris@0 31 <%= stylesheet_link_tag 'scm' %>
Chris@0 32 <% end %>