<% content_for :before_content do %> <% content_for :title, "Are you sure you want to delete #{@duplicate_logs.count == 1 ? 'this duplicate log' : 'these duplicate logs'}?" %> <%= govuk_back_link href: @log.lettings? ? lettings_log_duplicate_logs_path(@original_log, original_log_id: @original_log.id, referrer: params[:referrer], organisation_id: params[:organisation_id]) : sales_log_duplicate_logs_path(@original_log, original_log_id: @original_log.id, referrer: params[:referrer], organisation_id: params[:organisation_id]) %> <% end %>
Delete duplicate logs

<%= content_for(:title) %>

<%= govuk_warning_text(text: "You will not be able to undo this action.") %>

<%= @duplicate_logs.count == 1 ? "This log" : "These logs" %> will be deleted:

<%= govuk_button_to @duplicate_logs.count == 1 ? "Delete this log" : "Delete these logs", send("delete_logs_#{@log.class.name.underscore}s_path"), method: "delete", params: { ids: @duplicate_logs.map(&:id), original_log_id: @original_log.id, remaining_log_id: @log.id, referrer: params[:referrer], organisation_id: params[:organisation_id] } %> <%= govuk_button_link_to( "Cancel", send("#{@log.class.name.underscore}_duplicate_logs_path", @original_log, original_log_id: @original_log.id, referrer: params[:referrer], organisation_id: params[:organisation_id]), secondary: true, ) %>