Skip to content

Commit

Permalink
Merge pull request #2580 from alphagov/remove_custom_brexit_code
Browse files Browse the repository at this point in the history
Remove old Brexit code
  • Loading branch information
hannako authored Nov 3, 2022
2 parents c546d68 + 38678d7 commit 551f167
Show file tree
Hide file tree
Showing 79 changed files with 13 additions and 908 deletions.
2 changes: 1 addition & 1 deletion app/controllers/content_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def render_template
end

# use these and `@content_item.base_path` in the template
@notification_button_visible = @content_item.has_single_page_notifications? && !@content_item.brexit_child_taxon
@notification_button_visible = @content_item.has_single_page_notifications?
@include_single_page_notification_button_js = account_session_header.present?

request.variant = :print if params[:variant] == "print"
Expand Down
76 changes: 0 additions & 76 deletions app/lib/body_parser.rb

This file was deleted.

4 changes: 0 additions & 4 deletions app/presenters/content_item/body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,5 @@ def govspeak_body
direction: text_direction,
}
end

def title_and_link_sections
BodyParser.new(body.html_safe).title_and_link_sections
end
end
end
40 changes: 0 additions & 40 deletions app/presenters/content_item/brexit_taxons.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/presenters/content_item_presenter.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class ContentItemPresenter
include ContentItem::Withdrawable
include ContentItem::BrexitTaxons
include ContentItem::SinglePageNotificationButton
attr_reader :content_item,
:requested_path,
Expand Down
42 changes: 8 additions & 34 deletions app/views/content_items/detailed_guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
"/guidance/ecmt-international-road-haulage-permits",
]
scroll_track_percent_paths = [
"/guidance/brexit-guidance-for-businesses",
"/guidance/brexit-guidance-for-individuals-and-families",
"/guidance/import-and-export-goods-using-preference-agreements",
"/guidance/financial-evidence-for-sponsored-or-endorsed-work-routes",
]
Expand Down Expand Up @@ -61,35 +59,15 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<% brexit_child_taxon = @content_item.brexit_child_taxon %>
<% title_and_context = brexit_child_taxon ? { title: @content_item.title } : @content_item.title_and_context %>
<%= render 'govuk_publishing_components/components/title', title_and_context %>
<%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %>
</div>
<%= render 'shared/translations' %>
<div class="govuk-grid-column-two-thirds">
<% if brexit_child_taxon %>
<div class="govuk-body-l govuk-!-margin-bottom-7">
<p class="govuk-body">
<%= I18n.t("brexit.heading_prefix") %>
<%= link_to(
brexit_child_taxon[:nav_link][:text],
brexit_child_taxon[:nav_link][:path],
class: "govuk-link",
data: {
track_action: brexit_child_taxon[:nav_link][:path],
track_category: brexit_child_taxon[:nav_link][:track_category],
track_label: brexit_child_taxon[:nav_link][:track_label],
module: 'gem-track-click',
}) %>.
</p>
</div>
<% else %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
<% end %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

<%= render 'shared/publisher_metadata_with_logo' unless brexit_child_taxon %>
<%= render 'shared/publisher_metadata_with_logo' %>

<%= render 'shared/history_notice', content_item: @content_item %>
<%= render 'govuk_publishing_components/components/notice', @content_item.withdrawal_notice_component %>
Expand All @@ -115,18 +93,14 @@
section: 'Contents',
},
},
} unless brexit_child_taxon %>
} %>

<% if brexit_child_taxon %>
<%= render partial: 'content_items/detailed_guide/brexit_sections', locals: { brexit_child_taxon: brexit_child_taxon } %>
<% else %>
<%= render 'govuk_publishing_components/components/govspeak', {} do %>
<%= raw(@content_item.govspeak_body[:content]) %>
<% end %>
<%= render 'govuk_publishing_components/components/govspeak', {} do %>
<%= raw(@content_item.govspeak_body[:content]) %>
<% end %>

<div class="responsive-bottom-margin">
<%= render 'shared/published_dates_with_notification_button', { brexit_child_taxon: brexit_child_taxon } %>
<%= render 'shared/published_dates_with_notification_button' %>
</div>
<% end %>
<%= render "govuk_publishing_components/components/print_link", {
Expand All @@ -142,7 +116,7 @@
section: 'Footer',
},
},
} unless brexit_child_taxon %>
} %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
26 changes: 0 additions & 26 deletions app/views/content_items/detailed_guide/_brexit_sections.html.erb

This file was deleted.

3 changes: 0 additions & 3 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
<% unless @do_not_show_breadcrumbs %>
<% if @content_item.try(:back_link) %>
<%= render 'govuk_publishing_components/components/back_link', href: @content_item.back_link %>
<% elsif @content_item.brexit_child_taxon %>
<%= render 'govuk_publishing_components/components/breadcrumbs',
breadcrumbs: [ { url: "/", title: "Home" } , { url: "/brexit", title: "Brexit" } ] %>
<% else %>
<%= render 'govuk_publishing_components/components/contextual_breadcrumbs', content_item: @content_item.parsed_content_item %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<% brexit_child_taxon ||= nil %>

<%= render 'components/published-dates', {
published: @content_item.published,
last_updated: @content_item.updated,
history: @content_item.history,
margin_bottom: 3,
} unless brexit_child_taxon %>
} %>
<%= render 'govuk_publishing_components/components/single_page_notification_button', {
base_path: @content_item.base_path,
js_enhancement: @include_single_page_notification_button_js,
Expand Down
1 change: 1 addition & 0 deletions config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ignore_unused:
- 'content_item.schema_name.*.{one,other,zero,few,many,two}'
- 'corporate_information_page.*'
- 'travel_advice.alert_status.*'
- 'publication.documents.other'
8 changes: 0 additions & 8 deletions config/locales/ar.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
ar:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: توجيهات للمشروعات بخصوص برِيكْسِت
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: توجيهات للأفراد والعائلات بخصوص برِيكْسِت
heading_prefix: هناك نسخة مختلفة من
common:
visit: 'تفضّل بزيارة:'
components:
Expand Down
8 changes: 0 additions & 8 deletions config/locales/az.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
az:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: Bizneslər üçün Brexit ilə bağlı göstərişlər
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: Fərdlər və ailələr üçün Brexit ilə bağlı göstərişlər
heading_prefix: Fərqliliklər mövcuddur
common:
visit: 'Baş çəkin:'
components:
Expand Down
8 changes: 0 additions & 8 deletions config/locales/be.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
be:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: Кіраўніцтва па Брэкзiт для прадпрыемстваў
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: Кіраўніцтва па Брэкзiт для асобных асоб і сем'яў
heading_prefix: Ёсць розныя
common:
visit: 'Наведайце:'
components:
Expand Down
8 changes: 0 additions & 8 deletions config/locales/bg.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
bg:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: Брекзит насока за предприятията
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: Брекзит насока за лица и семейства
heading_prefix: Има различен
common:
visit: 'Посетете:'
components:
Expand Down
8 changes: 0 additions & 8 deletions config/locales/bn.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
bn:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: ব্যবসার জন্য ব্রেক্সিটের নির্দেশনা
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: ব্যক্তি ও পরিবারবর্গের জন্য ব্রেক্সিটের নির্দেশনা
heading_prefix: পার্থক্য আছে
common:
visit: 'ভিজিট করুন:'
components:
Expand Down
8 changes: 0 additions & 8 deletions config/locales/cs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
cs:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: Pokyny pro podniky k brexitu
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: Pokyny k brexitu pro jednotlivce a rodiny
heading_prefix: Existují různé
common:
visit: 'Navštivte:'
components:
Expand Down
8 changes: 0 additions & 8 deletions config/locales/cy.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
cy:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: Canllawiau Brexit i fusnesau
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: Canllawiau Brexit i unigolion a theuluoedd
heading_prefix: Dyna wahaniaeth
common:
visit: 'Ymweld:'
components:
Expand Down
8 changes: 0 additions & 8 deletions config/locales/da.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
---
da:
brexit:
business_link:
path: "/guidance/brexit-guidance-for-businesses"
text: Brexit-vejledning for virksomheder
citizen_link:
path: "/guidance/brexit-guidance-for-individuals-and-families"
text: Brexit-vejledning for enkeltpersoner og familier
heading_prefix: Der er forskellige
common:
visit: 'Besøge:'
components:
Expand Down
Loading

0 comments on commit 551f167

Please sign in to comment.