Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
SocFoot committed Jan 4, 2024
1 parent e01f848 commit 1522e51
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 43 deletions.
65 changes: 37 additions & 28 deletions app/views/claims/pages/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,54 @@
<div class="govuk-grid-row">
<br><br>
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-l"><%= t("organisation_details") %></h1>
<h1 class="govuk-heading-l"><%= t("claims.pages.index.heading") %></h1>
<%= govuk_summary_list do |summary_list|
summary_list.with_row do |row|
row.with_key(text: t("organisation_name"))
row.with_value(text: @user&.schools&.first&.gias_school&.name)
end; summary_list.with_row do |row|
row.with_key(text: t("uk_provider_reference_number"))
row.with_value(text: @user&.schools&.first&.gias_school&.ukprn)
end; summary_list.with_row do |row|
row.with_key(text: t("unique_reference_number"))
row.with_value(text: @user&.schools&.first&.gias_school&.urn)
end; end %>
summary_list.with_row do |row|
row.with_key(text: t("claims.pages.index.organisation_name"))
row.with_value(text: "Hogwarts")
end
summary_list.with_row do |row|
row.with_key(text: t("claims.pages.index.uk_provider_reference_number"))
row.with_value(text: "fake_uprn")
end
summary_list.with_row do |row|
row.with_key(text: t("claims.pages.index.unique_reference_number"))
row.with_value(text: 1)
end
end %>

<h2 class="govuk-heading-m govuk-!-margin-top-9">Contact details</h2>
<%= govuk_summary_list do |summary_list|
summary_list.with_row do |row|
row.with_key(text: t("email_address"))
row.with_key(text: t("claims.pages.index.email_address"))
row.with_value do %>
<a href="[email protected]"><%= @user.email %></a>
<% end;row.with_action(text: t('change'), visually_hidden_text: t("email_address"), href: '/contact-details')
end;summary_list.with_row do |row|
row.with_key(text: 'Telephone number')
row.with_value(text: @user&.schools&.first&.gias_school.telephone)
row.with_action(text: t('change'), visually_hidden_text: t("email_address"), href: '/contact-details')
end;summary_list.with_row do |row|
<a href="[email protected]"><%= "[email protected]" %></a>
<% end %>
<% row.with_action(text: t('claims.pages.index.change'), visually_hidden_text: t("claims.pages.index.email_address"), href: '/contact-details')
end %>
<% summary_list.with_row do |row|
row.with_key(text: "Telephone number")
row.with_value(text: "0123456789")
row.with_action(text: t("claims.pages.index.change"), visually_hidden_text: t("claims.pages.index.email_address"), href: "/contact-details")
end %>
<% summary_list.with_row do |row|
row.with_key(text: 'Website')
row.with_value do %>
<a href="<%= @user&.schools&.first&.gias_school&.website %>"><%= @user&.schools&.first&.gias_school&.website %></a>
<% end;row.with_action(text: t('change'), visually_hidden_text: t('email_address'), href: '/contact-details')
end;summary_list.with_row do |row|
row.with_key(text: t('address'))
<a href="<%= 'www.hogwarts.com' %>"><%= "www.hogwarts.com" %></a>
<% end;row.with_action(text: t('claims.pages.index.change'), visually_hidden_text: t('claims.pages.index.email_address'), href: '/contact-details')
end %>
<% summary_list.with_row do |row|
row.with_key(text: t('claims.pages.index.address'))
row.with_value do %>
<p class="govuk-body">
<%= @user&.schools&.first&.gias_school&.address1 %><br>
<%= @user&.schools&.first&.gias_school&.address2 %><br>
<%= @user&.schools&.first&.gias_school&.address3 %><br>
<%= "Hogwarts Castle" %><br>
<%= "Scotland" %><br>
<%= "United Kingdom" %><br>
</p>
<% end;row.with_action(text: t('change'), visually_hidden_text: t('email_address'), href: '/contact-details')
end;end %>
<% end %>
<% row.with_action(text: t('claims.pages.index.change'), visually_hidden_text: t('claims.pages.index.email_address'), href: '/contact-details')
end %>
<% end %>
</div>
</div>
<% end %>
17 changes: 10 additions & 7 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ en:
provider_code:
taken: Provider already exists
add_organisation: Add organisation
organisations: Organisations
schools: Schools
organisation_details: Organisation details
providers: Providers
Expand Down Expand Up @@ -57,6 +56,15 @@ en:
heading: Placements news and updates
contents: Contents
claims:
pages:
index:
heading: Organisations
organisation_name: Organisation name
uk_provider_reference_number: UK provider reference number (UKPRN)
unique_reference_number: Unique reference number (URN)
email_address: email address
change: Change
address: address
support:
users:
index:
Expand All @@ -69,9 +77,4 @@ en:
organisation_details: Organisation details
users: Users
claims: Claims
organisation_name: Organisation name
uk_provider_reference_number: UK provider reference number (UKPRN)
unique_reference_number: Unique reference number (URN)
email_address: email address
change: Change
address: address

8 changes: 0 additions & 8 deletions spec/system/home_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@

private

def given_i_am_on_the_claims_site
Capybara.app_host = "http://#{ENV["CLAIMS_HOST"]}"
end

def given_i_am_on_the_placements_site
Capybara.app_host = "http://#{ENV["PLACEMENTS_HOST"]}"
end

def and_given_i_have_a_school
create(:gias_school)
end
Expand Down

0 comments on commit 1522e51

Please sign in to comment.