Skip to content

Commit

Permalink
Merge pull request #3386 from alphagov/remove-hard-coded-afghanistan-…
Browse files Browse the repository at this point in the history
…travel-advice

Remove hard coded Afghanistan travel advice
  • Loading branch information
KludgeKML authored Sep 12, 2023
2 parents 110e1e3 + f08b997 commit 79bcbe9
Show file tree
Hide file tree
Showing 69 changed files with 2 additions and 114 deletions.
7 changes: 0 additions & 7 deletions app/models/topical_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ def ordered_featured_documents
end
end

def travel_advice
return [] if slug != "afghanistan-uk-government-response"

advice = ContentItem.find!("/foreign-travel-advice/afghanistan").to_hash
[advice.slice("base_path", "title")]
end

def latest
@latest ||= @documents_service.fetch_related_documents_with_format
end
Expand Down
28 changes: 2 additions & 26 deletions app/views/topical_events/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
<p class="govuk-body"><%= I18n.t("topical_events.no_updates") %></p>
<% end %>

<div
data-module="ga4-link-tracker"
<div
data-module="ga4-link-tracker"
data-ga4-link='{ "event_name": "navigation", "type": "subscribe", "index": { "index_link": 1 }, "index_total": 1, "section": "Content" }'
data-ga4-track-links-only
>
Expand All @@ -155,30 +155,6 @@
<%= render(partial: 'shared/document_list_from_search_api', locals: { documents: @topical_event.guidance_and_regulation, heading: I18n.t("topical_events.headings.guidance_and_regulation"), link_to: search_url(:topical_event, :guidance_and_regulation, @topical_event.slug) }) if @topical_event.guidance_and_regulation.any? %>
</section>

<div class="govuk-grid-column-two-thirds">
<% if @topical_event.travel_advice.any? %>
<section id="travel-advice">
<%= render "govuk_publishing_components/components/heading", {
text: t("topical_events.headings.travel_advice"),
font_size: "l",
margin_bottom: 4,
padding: true,
border_top: 2,
} %>
<%= render "govuk_publishing_components/components/document_list", {
items: @topical_event.travel_advice.map do |travel_advice|
{
link: {
text: travel_advice["title"],
path: travel_advice["base_path"]
}
}
end
} %>
</section>
<% end %>
</div>

<div class="govuk-grid-column-two-thirds">
<% if @topical_event.emphasised_organisations && @topical_event.emphasised_organisations.any? %>
<div class="organisations">
Expand Down
1 change: 0 additions & 1 deletion config/locales/ar/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ar:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/az/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ az:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/be/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ be:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/bg/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ bg:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/bn/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ bn:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/cs/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cs:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/cy/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ cy:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/da/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ da:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/de/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ de:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/dr/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dr:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/el/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ el:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/en/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ en:
guidance_and_regulation: Guidance and regulation
latest: Latest
publications: Publications
travel_advice: Travel advice
no_updates: There are no updates yet.
organisations: Who’s involved
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/es-419/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ es-419:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/es/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ es:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/et/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ et:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/fa/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fa:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/fi/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fi:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/fr/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ fr:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/gd/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ gd:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/gu/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ gu:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/he/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ he:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/hi/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ hi:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/hr/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ hr:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/hu/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ hu:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/hy/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ hy:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/id/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ id:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/is/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ is:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/it/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ it:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/ja/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ja:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/ka/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ka:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/kk/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ kk:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/ko/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ko:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/lt/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ lt:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/lv/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ lv:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/ms/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ms:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/mt/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ mt:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/ne/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ne:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/nl/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ nl:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/no/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/pa-pk/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pa-pk:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/pa/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pa:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/pl/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ pl:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
1 change: 0 additions & 1 deletion config/locales/ps/topical_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ ps:
guidance_and_regulation:
latest:
publications:
travel_advice:
no_updates:
organisations:
platinum_jubilee_unboxed:
Expand Down
Loading

0 comments on commit 79bcbe9

Please sign in to comment.