history.rhtml
36 lines
| 1.5 KiB
| text/html+ruby
|
RhtmlLexer
|
r330 | <h2><%= @page.pretty_title %></h2> | ||
<h3><%= l(:label_history) %></h3> | ||||
|
r580 | <% form_tag({:action => "diff"}, :method => :get) do %> | ||
|
r4151 | <%= hidden_field_tag('project_id', h(@project.to_param)) %> | ||
|
r330 | <table class="list"> | ||
<thead><tr> | ||||
<th>#</th> | ||||
|
r580 | <th></th> | ||
<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| %> | ||
<tr class="<%= cycle("odd", "even") %>"> | ||||
|
r4189 | <td class="id"><%= link_to 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> | ||
|
r330 | <td align="center"><%= format_time(ver.updated_on) %></td> | ||
|
r3382 | <td><%= link_to_user ver.author %></td> | ||
|
r476 | <td><%=h ver.comments %></td> | ||
|
r4182 | <td align="center"><%= 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 %> | ||