Browse Source

refactor: tidy up code and add single quotes instead of apostrophes

pull/957/head
natdeanlewissoftwire 3 years ago
parent
commit
518a5abee5
  1. 8
      app/views/organisation_relationships/housing_providers.html.erb
  2. 4
      app/views/organisation_relationships/remove_housing_provider.html.erb

8
app/views/organisation_relationships/housing_providers.html.erb

@ -9,8 +9,7 @@
) do |notification_banner|
notification_banner.heading(text: "#{Organisation.find(params['related_organisation_id']).name} is now one of your housing providers")
end %>
<% end %>
<% if params["removed_organisation_id"] %>
<% elsif params["removed_organisation_id"] %>
<%= govuk_notification_banner(
title_text: "Success",
success: true, title_heading_level: 3,
@ -32,14 +31,13 @@
) do |notification_banner|
notification_banner.heading(text: "#{Organisation.find(params['related_organisation_id']).name} is now one of this organisation's housing providers")
end %>
<% end %>
<% if params["removed_organisation_id"] %>
<% elsif params["removed_organisation_id"] %>
<%= govuk_notification_banner(
title_text: "Success",
success: true, title_heading_level: 3,
title_id: "swanky-notifications"
) do |notification_banner|
notification_banner.heading(text: "#{Organisation.find(params['removed_organisation_id']).name} is no longer one of this organisation housing providers")
notification_banner.heading(text: "#{Organisation.find(params['removed_organisation_id']).name} is no longer one of this organisation's housing providers")
end %>
<% end %>
<p class="govuk-body">This organisation can submit logs for its housing providers.</p>

4
app/views/organisation_relationships/remove_housing_provider.html.erb

@ -8,12 +8,12 @@
<% @housing_provider = Organisation.find(@organisation_to_remove_id) %>
<% if current_user.support? %>
<%= govuk_back_link(href: :back) %>
<%= render partial: "organisations/headings", locals: { main: "You are removing '#{@housing_provider.name}' from this organisation's housing providers", sub: nil } %>
<%= render partial: "organisations/headings", locals: { main: "You are removing ‘#{@housing_provider.name}’ from this organisation's housing providers", sub: nil } %>
<% else %>
<% content_for :before_content do %>
<%= govuk_back_link(href: :back) %>
<% end %>
<%= render partial: "organisations/headings", locals: { main: "You are removing #{@housing_provider.name} from your organisation's housing providers", sub: nil } %>
<%= render partial: "organisations/headings", locals: { main: "You are removing #{@housing_provider.name} from your organisation's housing providers", sub: nil } %>
<% end %>
<%= govuk_warning_text text: "You will no longer be able to submit logs for #{@housing_provider.name}" %>
<div class="govuk-button-group">

Loading…
Cancel
Save