<% content_for :before_content do %> <% content_for :title, "Are you sure you want to delete this log?" %> <%= govuk_back_link href: @log.lettings? ? lettings_logs_path : sales_logs_path %> <% end %> <div class="govuk-grid-row"> <div class="govuk-grid-column-two-thirds-from-desktop"> <span class="govuk-caption-xl">Delete log <%= @log.id %></span> <h1 class="govuk-heading-xl"> <%= content_for(:title) %> </h1> <%= govuk_warning_text(text: "You will not be able to undo this action.") %> <div class="govuk-button-group"> <%= govuk_button_to( "Delete this log", @log.lettings? ? lettings_log_path(@log) : sales_log_path(@log), method: :delete, ) %> <%= govuk_button_link_to( "Cancel", @log.lettings? ? lettings_log_path(@log) : sales_log_path(@log), secondary: true, ) %> </div> </div> </div>