<%#-- copyright OpenProject is an open source project management software. Copyright (C) 2012-2022 the OpenProject GmbH This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: Copyright (C) 2006-2013 Jean-Philippe Lang Copyright (C) 2010-2013 the ChiliProject Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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 COPYRIGHT and LICENSE files for more details. ++#%> <%= form_tag({controller: '/repositories', action: 'diff', project_id: @project, repo_path: to_path_param(path)}, method: :get) do %>
<% show_diff = revisions.size > 1 %> <% line_num = 1 %> <% revisions.each do |changeset| %> <% line_num += 1 %> <% end %>
<%= t(:text_table_difference_description, entries: t(:label_changeset) + ' ' + t(:label_version_plural)) %>
#
<%= t(:description_compare_from) + ' ' + t(:label_changeset) %>
<%= t(:description_compare_to) + ' ' + t(:label_changeset) %>
<%= t(:label_date) %>
<%= Changeset.human_attribute_name(:author) %>
<%= Changeset.human_attribute_name(:comments) %>
<%= link_to_revision(changeset, project) %> <%= label_tag "cb-#{line_num}", t(:description_compare_from) + ' ' + t(:label_changeset), class: 'hidden-for-sighted' %> <% if show_diff && (line_num < revisions.size) %> <%= radio_button_tag 'rev', changeset.identifier, (line_num==1), id: "cb-#{line_num}" %> <% csp_onclick("jQuery('#cbto-#{line_num+1}').attr('checked', true);", "cb-#{line_num}") %> <% end %> <%= label_tag "cbto-#{line_num}", t(:description_compare_to) + ' ' + t(:label_changeset), class: 'hidden-for-sighted' %> <% if show_diff && (line_num > 1) %> <%= radio_button_tag 'rev_to', changeset.identifier, (line_num==2), id: "cbto-#{line_num}" %> <% csp_onclick("if (jQuery('#cb-#{line_num}').attr('checked')) {jQuery('#cb-#{line_num-1}').attr('checked', true)}", "cbto-#{line_num}") %> <% end %> <%= format_time(changeset.committed_on) %> <%=h changeset.author %> <%= format_revision_text(truncate_at_line_break(Changeset.to_utf8(changeset.comments, changeset.repository.repo_log_encoding))) %>
<% if show_diff %>
<% end %> <% end %>