Skip to content

Commit

Permalink
AP-5434: Remove unnecessary spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
agoldstone93 committed Nov 7, 2024
1 parent 8ac7acb commit f17f934
Show file tree
Hide file tree
Showing 33 changed files with 30 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<h3 class="govuk-heading-m"><%= t(".bank_statement_heading") %></h3>

<% has_partner = @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %>
<%= govuk_summary_list(card: { title: t(".bank_statement_heading") }, actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".bank_statement_heading") }, actions: false) do |summary_list| %>
<% if @legal_aid_application.client_uploading_bank_statements? %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__bank_statements_client" }) do |row| %>
<%= row.with_key(text: has_partner ? t(".bank_statement_question_with_partner") : t(".bank_statement_question"), classes: "govuk-!-width-one-half") %>
Expand Down
7 changes: 3 additions & 4 deletions app/views/shared/check_answers/_assets.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<h3 class="govuk-heading-m"><%= t(".assets.money_in_bank_accounts") %></h3>

<%= govuk_summary_list(card: { title: t(".assets.money_in_bank_accounts") }, classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "applicant-bank-accounts" }) do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".assets.money_in_bank_accounts") }, html_attributes: { "data-test": "applicant-bank-accounts" }) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__online_current_accounts" }) do |row| %>
<%= row.with_key(text: @legal_aid_application&.applicant&.has_partner? ? t(".assets.client_current_account") : t(".assets.current_accounts"), classes: "govuk-!-width-one-half") %>
<%= row.with_value { online_current_accounts.present? ? gds_number_to_currency(online_current_accounts) : t("generic.none") } %>
Expand Down Expand Up @@ -64,7 +64,6 @@
</div>
<%= govuk_summary_list(
card: { title: t(".assets.client_bank_accounts") },
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "app-check-your-answers__bank_accounts_items", "data-test": "applicant-bank-accounts" },
) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__offline_current_accounts" }) do |row| %>
Expand Down Expand Up @@ -100,7 +99,7 @@
</div>
<% end %>
</div>
<%= govuk_summary_list(card: { title: t(".assets.partner_bank_accounts") }, classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "partner-bank-accounts" }) do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".assets.partner_bank_accounts") }, html_attributes: { "data-test": "partner-bank-accounts" }) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__partner_offline_current_accounts" }) do |row| %>
<%= row.with_key(text: t(".assets.partner_current_account"), classes: "govuk-!-width-one-half") %>
<%= row.with_value { @legal_aid_application.savings_amount.partner_offline_current_accounts.present? ? gds_number_to_currency(@legal_aid_application.savings_amount.partner_offline_current_accounts) : t("generic.none") } %>
Expand Down Expand Up @@ -128,7 +127,7 @@
</div>
<% end %>
</div>
<%= govuk_summary_list(card: { title: t(".assets.joint_bank_accounts") }, classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "joint-bank-accounts" }) do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".assets.joint_bank_accounts") }, html_attributes: { "data-test": "joint-bank-accounts" }) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__joint_offline_current_accounts" }) do |row| %>
<%= row.with_key(text: t(".assets.joint_current_account"), classes: "govuk-!-width-one-half") %>
<%= row.with_value { @legal_aid_application.savings_amount.joint_offline_current_accounts.present? ? gds_number_to_currency(@legal_aid_application.savings_amount.joint_offline_current_accounts) : t("generic.none") } %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/check_answers/_bank_statements.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"Client"
end %>

<%= govuk_summary_list(card: { title: t(".section_heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-9") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".section_heading") }, actions: !read_only) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__bank_statements_#{individual.downcase}" }) do |row| %>
<%= row.with_key(text: t(".bank_statement_question"), classes: "govuk-!-width-one-half") %>
<%= row.with_value do %>
Expand Down
3 changes: 1 addition & 2 deletions app/views/shared/check_answers/_benefits_income.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<% end %>

<h2 class="govuk-heading-m"><%= t(".#{transactions_for}.heading") %></h2>
<%= govuk_summary_list(card: { title: t(".#{transactions_for}.heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-9", html_attributes: { id: "state-benefit-section-#{transactions_for}" }) do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".#{transactions_for}.heading") }, actions: !read_only, html_attributes: { id: "state-benefit-section-#{transactions_for}" }) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{transactions_for}__state_benefits" }) do |row| %>
<%= row.with_key(text: t(".#{transactions_for}.question"), classes: "govuk-!-width-one-half") %>
<%= row.with_value { yes_no(individual.receives_state_benefits?) } %>
Expand Down Expand Up @@ -43,7 +43,6 @@
<%= govuk_summary_list(
card: { title: t(".benefit_heading", index: index + 1) },
actions: false,
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "app-check-your-answers__#{transactions_for}__state_benefits_#{index + 1}_items" },
) do |summary_list| %>
<%= summary_list.with_row do |row| %>
Expand Down
1 change: 0 additions & 1 deletion app/views/shared/check_answers/_cash_payments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<%= govuk_summary_list(
card: { title: t(".#{type}_heading", individual_with_determiner:) },
actions: false,
classes: "govuk-!-margin-bottom-9",
html_attributes: { "data-check-your-answers-section": t(".#{type}_heading", individual_with_determiner:).parameterize },
) do |summary_list| %>
<% if cash_transaction_types.none? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/check_answers/_children_involved.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
read_only:,
) %>

<%= govuk_summary_list(card: { title: t(".involved-children-heading") }, actions: false, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".involved-children-heading") }, actions: false) do |summary_list| %>
<% @legal_aid_application.involved_children.each_with_index do |child, i| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__involved_child_#{i + 1}" }) do |row| %>
<%= row.with_key(text: "#{t('.child')} #{i + 1}", classes: "govuk-!-width-one-half") %>
Expand Down
1 change: 0 additions & 1 deletion app/views/shared/check_answers/_client_details.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<%= govuk_summary_list(card: { title: "Client details" },
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "client-details-questions" },
actions: !read_only) do |summary_list| %>
<% if :first_name.in?(attributes) %>
Expand Down
3 changes: 1 addition & 2 deletions app/views/shared/check_answers/_dependants.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
providers_legal_aid_application_means_has_dependants_path
end %>

<%= govuk_summary_list(card: { title: t("providers.means.check_income_answers.dependants.heading") }, classes: "govuk-!-margin-bottom-9") do |summary_list| %>
<%= govuk_summary_list(card: { title: t("providers.means.check_income_answers.dependants.heading") }) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__dependants" }) do |row| %>
<%= row.with_key(text: t("shared.check_answers.dependants.has_dependants", individual:), classes: "govuk-!-width-one-half") %>
<%= row.with_value { yes_no(@legal_aid_application.has_dependants) } %>
Expand Down Expand Up @@ -37,7 +37,6 @@
<%= govuk_summary_list(
card: { title: "Dependant #{index + 1}: #{dependant.name}" },
actions: false,
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "app-check-your-answers__dependants_#{index + 1}_items" },
) do |summary_list| %>
<% dependant_hash(dependant)&.fetch(:items, [])&.each_with_index do |item, index| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/check_answers/_emergency_costs.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= govuk_summary_list(card: { title: "Emergency cost limit" }, actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %>
<%= govuk_summary_list(card: { title: "Emergency cost limit" }, actions: false) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_override" }) do |row| %>
<%= row.with_key(text: t(".request_higher_limit"), classes: "govuk-!-width-one-half") %>
<%= row.with_value { yes_no(@legal_aid_application.emergency_cost_override) } %>
Expand Down
1 change: 0 additions & 1 deletion app/views/shared/check_answers/_employed_income.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<%= govuk_summary_list(
card: { title: t(".#{individual}.heading") },
actions: false,
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "employment-#{individual}-notes-questions" },
) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__extra_employment_information" }) do |row| %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<% end %>
</div>

<%= govuk_summary_list(card: { title: t(".employment", individual:) }, actions: false, classes: "govuk-!-margin-bottom-9", html_attributes: { id: "employment-income-questions" }) do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".employment", individual:) }, actions: false, html_attributes: { id: "employment-income-questions" }) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__full_employment_details" }) do |row| %>
<%= row.with_key(text: t(".details", individual_with_determiner:).upcase_first, classes: "govuk-!-width-one-half") %>
<%= row.with_value { content.presence || "-" } %>
Expand Down
1 change: 0 additions & 1 deletion app/views/shared/check_answers/_housing_benefit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<%= govuk_summary_list(
card: { title: t(".heading") },
actions: false,
classes: "govuk-!-margin-bottom-9",
html_attributes: { "data-check-your-answers-section": t(".heading").parameterize },
) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__housing_benefit_question" }) do |row| %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/check_answers/_laspo.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section>
<h2 class="govuk-heading-m govuk-!-padding-top-6"><%= t(".heading") %></h2>
<%= govuk_summary_list(card: { title: t(".heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".heading") }, actions: !read_only) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__in_scope_of_laspo" }) do |row| %>
<%= row.with_key(text: t(".question"), classes: "govuk-!-width-one-half") %>
<%= row.with_value(text: yes_no(@legal_aid_application.in_scope_of_laspo)) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
read_only:,
) %>

<%= govuk_summary_list(card: { title: t(".latest-incident-heading") }, actions: false, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".latest-incident-heading") }, actions: false) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__notification_of_latest_incident" }) do |row| %>
<%= row.with_key(text: t(".notification_of_latest_incident"), classes: "govuk-!-width-one-half") %>
<%= row.with_value(text: incident&.told_on) %>
Expand Down
4 changes: 1 addition & 3 deletions app/views/shared/check_answers/_linking_and_copying.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</div>
<%= govuk_summary_list(card: { title: t(".section_linking.heading") },
actions: !read_only,
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "app-check-your-answers__linking_items" }) do |summary_list|
summary_list.with_row(classes: "app-check-your-answers__linking_question") do |row|
row.with_key(text: t(".section_linking.linked"), classes: "govuk-!-width-one-half")
Expand Down Expand Up @@ -40,7 +39,7 @@
<h2 class="govuk-heading-m"><%= t ".other_links_section.#{@legal_aid_application.lead_linked_application.link_type_code}" %></h2>
</div>
</div>
<%= govuk_summary_list(card: { title: t(".other_links_section.#{@legal_aid_application.lead_linked_application.link_type_code}") }, actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list|
<%= govuk_summary_list(card: { title: t(".other_links_section.#{@legal_aid_application.lead_linked_application.link_type_code}") }, actions: false) do |summary_list|
all_linked_applications(@legal_aid_application).each do |application|
summary_list.with_row do |row|
row.with_key(text: application.applicant.full_name, classes: "govuk-!-width-one-half")
Expand All @@ -66,7 +65,6 @@
</div>
<%= govuk_summary_list(card: { title: t(".section_copying.heading") },
actions: !read_only,
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "app-check-your-answers__copying_items" }) do |summary_list|
summary_list.with_row(classes: "app-check-your-answers__copy_question") do |row|
row.with_key(text: t(".section_copying.question"), classes: "govuk-!-width-one-half")
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/check_answers/_matter_opposition.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
read_only:,
) %>

<%= govuk_summary_list(card: { title: t(".matter_opposed_reason_heading") }, actions: false, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".matter_opposed_reason_heading") }, actions: false) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__matter_opposed_reason" }) do |row| %>
<%= row.with_key(text: t(".matter_opposed_reason"), classes: "govuk-!-width-one-half") %>
<%= row.with_value(text: @legal_aid_application.matter_opposition.reason) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section class="print-no-break govuk-!-padding-top-6">
<h2 class="govuk-heading-l"><%= proceeding.meaning %></h2>

<%= govuk_summary_list(card: { title: proceeding.meaning }, actions: !read_only, classes: "govuk-!-margin-bottom-0") do |summary_list| %>
<%= govuk_summary_list(card: { title: proceeding.meaning }, actions: !read_only) do |summary_list| %>
<% if proceeding.chances_of_success %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_success_likely" }) do |row| %>
<%= row.with_key(text: t(".prospects_of_success"), classes: "govuk-!-width-one-half") %>
Expand Down Expand Up @@ -62,7 +62,7 @@
<% end %>
<% end %>
<% if proceeding.specific_issue %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_specific_issue", classes: "govuk-!-margin-bottom-2" }) do |row| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_specific_issue" }) do |row| %>
<%= row.with_key(text: t(".specific_issue"), classes: "govuk-!-width-one-half") %>
<%= row.with_value(text: proceeding.specific_issue.details) %>
<%= row.with_action(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
<% end %>
</div>
<%= govuk_summary_list(card: { title: t(".heading") }, actions: false, classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "offline-savings-accounts" }) do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".heading") }, actions: false, html_attributes: { "data-test": "offline-savings-accounts" }) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__has_offline_savings" }) do |row| %>
<%= row.with_key(text: t(".offline_savings_accounts"), classes: "govuk-!-width-one-half") %>
<%= row.with_value { safe_yes_or_no(@legal_aid_application.offline_savings?) } %>
Expand All @@ -29,7 +29,7 @@
<% end %>
<% else %>
<h3 class="govuk-heading-m"><%= t(".heading") %></h3>
<%= govuk_summary_list(card: { title: t(".heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-9") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".heading") }, actions: !read_only) do |summary_list| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__has_offline_savings" }) do |row| %>
<%= row.with_key(text: t(".offline_savings_accounts"), classes: "govuk-!-width-one-half") %>
<%= row.with_value { safe_yes_or_no(@legal_aid_application.offline_savings?) } %>
Expand Down
1 change: 0 additions & 1 deletion app/views/shared/check_answers/_one_link_section.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<%= govuk_summary_list(
card: { title: question },
actions: !read_only,
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "app-check-your-answers__#{name}_items" },
) do |summary_list| %>
<% if answer_hash.present? %>
Expand Down
10 changes: 5 additions & 5 deletions app/views/shared/check_answers/_opponent_details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
question: t(".opponent-heading"),
read_only:,
) %>
<%= govuk_summary_list(card: { title: t(".opponent-heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".opponent-heading") }, actions: !read_only) do |summary_list| %>
<% opponents.order(:created_at).each_with_index do |opponent, i| %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__opponent_#{i + 1}" }) do |row| %>
<%= row.with_key(text: "#{t('.opponent')} #{i + 1}", classes: "govuk-!-width-one-half") %>
Expand All @@ -14,7 +14,7 @@
<% end %>
<% end %>
<% if parties_mental_capacity %>
<%= govuk_summary_list(card: { title: t(".mental_capacity.heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".mental_capacity.heading") }, actions: !read_only) do |summary_list| %>
<%= summary_list.with_row(
html_attributes: { id: "app-check-your-answers__opponent_understands_terms_of_court_order" },
) do |row| %>
Expand All @@ -41,7 +41,7 @@
<% end %>

<% if task_list_includes?(@legal_aid_application, :domestic_abuse_summary) %>
<%= govuk_summary_list(card: { title: t(".domestic_abuse.heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".domestic_abuse.heading") }, actions: !read_only) do |summary_list| %>
<% unless domestic_abuse_summary.warning_letter_sent? %>
<%= summary_list.with_row(
html_attributes: { id: "app-check-your-answers__opponent_warning_letter_sent" },
Expand Down Expand Up @@ -92,7 +92,7 @@
<% end %>

<% unless @legal_aid_application.special_children_act_proceedings? %>
<%= govuk_summary_list(card: { title: t(".statement_of_case.heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".statement_of_case.heading") }, actions: !read_only) do |summary_list| %>
<% if attachments_with_size(statement_of_case&.original_attachments).present? %>
<%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__statement_of_case_file" }) do |row| %>
<%= row.with_key(text: t(".statement_of_case.file_names"), classes: "govuk-!-width-one-half") %>
Expand Down Expand Up @@ -125,7 +125,7 @@
<% end %>

<% if @legal_aid_application.allegation %>
<%= govuk_summary_list(card: { title: t(".allegation.heading") }, actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %>
<%= govuk_summary_list(card: { title: t(".allegation.heading") }, actions: !read_only) do |summary_list| %>
<%= summary_list.with_row(
html_attributes: { id: "app-check-your-answers__allegation_denies_all" },
) do |row| %>
Expand Down
1 change: 0 additions & 1 deletion app/views/shared/check_answers/_partner_details.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
heading_class = local_assigns.key?(:heading) ? local_assigns[:heading] : "govuk-heading-m" %>
<h2 class="<%= heading_class %>"><%= t ".section_heading" %></h2>
<%= govuk_summary_list(card: { title: "Partner's details" },
classes: "govuk-!-margin-bottom-9",
html_attributes: { id: "partner-details-questions" },
actions: !read_only) do |summary_list| %>

Expand Down
1 change: 0 additions & 1 deletion app/views/shared/check_answers/_payments_summary.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<%= govuk_summary_list(
card: { title: payment_type },
actions: false,
classes: "govuk-!-margin-bottom-9",
html_attributes: { "data-check-your-answers-section": payment_type.parameterize },
) do |summary_list| %>
<% transaction_types.each do |transaction_type| %>
Expand Down
Loading

0 comments on commit f17f934

Please sign in to comment.