history.html.erb
37 lines
| 1.7 KiB
| text/plain
|
TextLexer
|
r6062 | <%= wiki_page_breadcrumb(@page) %> | ||
|
r6279 | <h2><%= h(@page.pretty_title) %></h2> | ||
|
r330 | |||
<h3><%= l(:label_history) %></h3> | ||||
|
r8344 | <% form_tag({:controller => 'wiki', :action => 'diff', :project_id => @page.project, :id => @page.title}, :method => :get) do %> | ||
|
r4531 | <table class="list wiki-page-versions"> | ||
|
r330 | <thead><tr> | ||
<th>#</th> | ||||
|
r580 | <th></th> | ||
|
r6216 | <th></th> | ||
|
r330 | <th><%= l(:field_updated_on) %></th> | ||
<th><%= l(:field_author) %></th> | ||||
|
r476 | <th><%= l(:field_comments) %></th> | ||
|
r1007 | <th></th> | ||
|
r330 | </tr></thead> | ||
<tbody> | ||||
|
r580 | <% show_diff = @versions.size > 1 %> | ||
<% line_num = 1 %> | ||||
|
r330 | <% @versions.each do |ver| %> | ||
|
r4531 | <tr class="wiki-page-version <%= cycle("odd", "even") %>"> | ||
|
r6272 | <td class="id"><%= link_to h(ver.version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td> | ||
|
r797 | <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> | ||
|
r3445 | <td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td> | ||
|
r4531 | <td class="updated_on"><%= format_time(ver.updated_on) %></td> | ||
<td class="author"><%= link_to_user ver.author %></td> | ||||
<td class="comments"><%=h ver.comments %></td> | ||||
<td class="buttons"><%= link_to l(:button_annotate), :action => 'annotate', :id => @page.title, :version => ver.version %></td> | ||||
|
r330 | </tr> | ||
|
r580 | <% line_num += 1 %> | ||
|
r330 | <% end %> | ||
</tbody> | ||||
</table> | ||||
|
r1748 | <%= submit_tag l(:label_view_diff), :class => 'small' if show_diff %> | ||
|
r1013 | <span class="pagination"><%= pagination_links_full @version_pages, @version_count, :page_param => :p %></span> | ||
|
r580 | <% end %> | ||