OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/meeting_contents/history.html.erb

57 lines
2.4 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2011-2013 the OpenProject Foundation (OPF)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License version 3.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See doc/COPYRIGHT.md for more details.
++#%>
<h2><%= l(:"label_#{@content_type}") %>: <%= link_to @meeting, @meeting %></h2>
<h3><%= l(:label_history) %></h3>
<%= form_tag({:action => "diff"}, :method => :get) do %>
<table class="list">
<thead><tr>
<th>#</th>
<th></th>
<th></th>
<th><%= Meeting.human_attribute_name(:updated_on) %></th>
<th><%= Meeting.human_attribute_name(:author) %></th>
<th><%= Meeting.human_attribute_name(:comments) %></th>
</tr></thead>
<tbody>
<% show_diff = @content_versions.size > 1 %>
<% @content_versions.each_with_index do |content_version,index| %>
<tr class="<%= cycle("odd", "even") %>">
<td class="id">
<%= content_version.version == @content.version ?
link_to(content_version.version, tab_meeting_path(@meeting, :tab => @content_type.sub(/^meeting_/, ''))) :
link_to(content_version.version, send(:"#{@content_type}_version_path", @meeting, content_version.version)) %>
</td>
<td class="checkbox"><%= radio_button_tag('version_to', content_version.version, (index==0), :id => "checkbox-from-#{index}", :onclick => "$('checkbox-to-#{index+1}').checked=true;") if show_diff && (index < @content_versions.size-1) %></td>
<td class="checkbox"><%= radio_button_tag('version_from', content_version.version, (index==1), :id => "checkbox-to-#{index}") if show_diff && (index > 0) %></td>
<td align="center"><%= format_time(content_version.created_at) %></td>
<td><em><%= User.find content_version.user_id %></em></td>
<td><%=h content_version.notes %></td>
</tr>
<% end %>
</tbody>
</table>
<%= submit_tag l(:label_view_diff), :class => 'small' if show_diff %>
<%= pagination_links_full @content_versions %>
<% end %>
<%= render :partial => 'shared/meeting_header' %>