annotate app/views/wiki/history.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 0579821a129a
children
rev   line source
Chris@0 1 <h2><%= @page.pretty_title %></h2>
Chris@0 2
Chris@0 3 <h3><%= l(:label_history) %></h3>
Chris@0 4
Chris@0 5 <% form_tag({:action => "diff"}, :method => :get) do %>
Chris@119 6 <table class="list wiki-page-versions">
Chris@0 7 <thead><tr>
Chris@0 8 <th>#</th>
Chris@0 9 <th></th>
Chris@0 10 <th></th>
Chris@0 11 <th><%= l(:field_updated_on) %></th>
Chris@0 12 <th><%= l(:field_author) %></th>
Chris@0 13 <th><%= l(:field_comments) %></th>
Chris@0 14 <th></th>
Chris@0 15 </tr></thead>
Chris@0 16 <tbody>
Chris@0 17 <% show_diff = @versions.size > 1 %>
Chris@0 18 <% line_num = 1 %>
Chris@0 19 <% @versions.each do |ver| %>
Chris@119 20 <tr class="wiki-page-version <%= cycle("odd", "even") %>">
chris@37 21 <td class="id"><%= link_to ver.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td>
Chris@0 22 <td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < @versions.size) %></td>
Chris@0 23 <td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
Chris@119 24 <td class="updated_on"><%= format_time(ver.updated_on) %></td>
Chris@119 25 <td class="author"><%= link_to_user ver.author %></td>
Chris@119 26 <td class="comments"><%=h ver.comments %></td>
Chris@119 27 <td class="buttons"><%= link_to l(:button_annotate), :action => 'annotate', :id => @page.title, :version => ver.version %></td>
Chris@0 28 </tr>
Chris@0 29 <% line_num += 1 %>
Chris@0 30 <% end %>
Chris@0 31 </tbody>
Chris@0 32 </table>
Chris@0 33 <%= submit_tag l(:label_view_diff), :class => 'small' if show_diff %>
Chris@0 34 <span class="pagination"><%= pagination_links_full @version_pages, @version_count, :page_param => :p %></span>
Chris@0 35 <% end %>