Skip to content

Commit

Permalink
Use govuk_link_to new_tab argument
Browse files Browse the repository at this point in the history
This automatically makes the link open in a new tab by setting the
correct HTML attributes.
  • Loading branch information
thomasleese committed Feb 15, 2024
1 parent 87aaae3 commit b088157
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions app/helpers/upload_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ def upload_link_to(upload)
govuk_link_to(
"#{upload.name} (opens in a new tab)",
upload_path(upload),
target: :_blank,
rel: :noopener,
new_tab: true,
)

scan_result_problem =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

<% if provider.check_url.present? %>
<p class="govuk-body">Check the applicant’s <%= provider.reference_name %> at:</p>
<p class="govuk-body"><%= govuk_link_to provider.check_url, provider.check_url, target: "_blank", rel: "noreferrer noopener" %></p>
<p class="govuk-body"><%= govuk_link_to provider.check_url, provider.check_url, new_tab: true %></p>
<% end %>
<% else %>
<p class="govuk-body">
Applicants from <%= CountryName.from_region(region, with_definite_article: true) %> can provide tests from a wider range of approved providers.
</p>

<p class="govuk-body">
<%= govuk_link_to "Approved providers", "https://register.ofqual.gov.uk/Search?category=Qualifications&query=ESOl", target: "_blank", rel: "noreferrer noopener" %>
<%= govuk_link_to "Approved providers", "https://register.ofqual.gov.uk/Search?category=Qualifications&query=ESOl", new_tab: true %>
</p>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<% if (online_checker_url = region.teaching_authority_online_checker_url).present? %>
<% accordion.with_section(heading_text: "Online checker") do %>
<p class="govuk-body">This authority has an online checker for validating the supplied registration number:</p>
<p class="govuk-body"><%= govuk_link_to online_checker_url, online_checker_url, target: "_blank", rel: "noreferrer noopener" %></p>
<p class="govuk-body"><%= govuk_link_to online_checker_url, online_checker_url, new_tab: true %></p>
<% end %>
<% end %>

Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_employment_warning.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= govuk_warning_text do %>
The Department for Education (DfE) does not employ teachers directly.
To find a teaching job, you must <%= govuk_link_to "apply to individual schools in England", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas/#find-a-teaching-job", target: "_blank", rel: "noreferrer noopener" %>.
To find a teaching job, you must <%= govuk_link_to "apply to individual schools in England", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas/#find-a-teaching-job", new_tab: true %>.
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<h3 class="govuk-heading-s">Finding a certified translator</h3>

<p class="govuk-body">
We cannot recommend translation providers. You can find a professional translator through the <%= govuk_link_to "Institute of Translating and Interpreting (ITI) (opens in new tab)", "https://www.iti.org.uk/component/itisearch/?view=translators", target: :_blank, rel: :noopener %>. All listed translators have been certified by the ITI and are qualified to complete translations.
We cannot recommend translation providers. You can find a professional translator through the <%= govuk_link_to "Institute of Translating and Interpreting (ITI) (opens in new tab)", "https://www.iti.org.uk/component/itisearch/?view=translators", new_tab: true %>. All listed translators have been certified by the ITI and are qualified to complete translations.
</p>

<p class="govuk-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<p class="govuk-body">You’ll need a Secure English Language Test (SELT) at level B2 from an approved provider.</p>
<% else %>
<p class="govuk-body">
If you cannot provide one of the documents described in 1,2 or 3, you'll need a <a href="https://www.coe.int/en/web/common-european-framework-reference-languages/table-1-cefr-3.3-common-reference-levels-global-scale" target="_blank">B2 level</a> Secure English Language Test (SELT) from on approved provider. We accept the following approved providers and tests:
If you cannot provide one of the documents described in 1,2 or 3, you'll need a <%= govuk_link_to "B2 level", "https://www.coe.int/en/web/common-european-framework-reference-languages/table-1-cefr-3.3-common-reference-levels-global-scale", new_tab: true %> Secure English Language Test (SELT) from on approved provider. We accept the following approved providers and tests:
</p>

<ul class="govuk-list govuk-list--bullet">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<% if @years_count == 0 && @months_count < 9 %>
<%= govuk_details(summary_text: "I do not have more than 9 months of teaching experience") do %>
<p class="govuk-body">QTS requires a minimum of 9 months of active teaching experience. We can keep your application open for 6 months, so you can continue later, if you gain enough experience in that time.</p>
<p class="govuk-body">Alternatively, you can <a href="https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas" class="govuk-link" rel="noreferrer noopener" target="_blank">explore other ways to teach in England (opens in new tab)</a>.</p>
<p class="govuk-body">Alternatively, you can <%= govuk_link_to "explore other ways to teach in England (opens in new tab)", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas", new_tab: true %>.</p>
<% end %>
<% end %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

<h1 class="govuk-heading-l">Your work experience does not meet all of the requirements for QTS</h1>

<p class="govuk-body">You can <a href="https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas" class="govuk-link govuk-link--no-visited-state" rel="noreferrer noopener" target="_blank">explore other ways to teach in England (opens in new tab)</a>.</p>
<p class="govuk-body">
You can <%= govuk_link_to "explore other ways to teach in England (opens in new tab)", "https://getintoteaching.education.gov.uk/non-uk-teachers/teach-in-england-if-you-trained-overseas", new_tab: true %>.
</p>

<%= render "shared/help_us_to_improve_this_service" %>

0 comments on commit b088157

Please sign in to comment.