Skip to content

Commit

Permalink
Merge pull request #7990 from alphagov/remove-hasatw-page
Browse files Browse the repository at this point in the history
Remove code for the help and services around the world page
  • Loading branch information
JonathanHallam authored Aug 8, 2023
2 parents f77a272 + 155c07a commit 608fc9d
Show file tree
Hide file tree
Showing 87 changed files with 8,612 additions and 9,972 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
Whitehall is deployed in two modes:

- 'admin' for publishers to create and manage content (e.g. <http://whitehall-admin.dev.gov.uk/government/admin/news/new>)
- 'frontend' for rendering content to the public that has yet to be migrated to using Publishing API (see live examples that follow)

## Live examples (public facing frontend)

### World Information

- Help and services around the world: [https://www.gov.uk/world](https://www.gov.uk/world)
- 'frontend' is a legacy mode that was used for rendering content to the public that had yet to be migrated to using Publishing API work to remove this is being carried out by the Publishing Platform team

## Running the Application

Expand Down
101 changes: 0 additions & 101 deletions app/assets/javascripts/frontend/filter-list-items.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/assets/javascripts/frontend/on_ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
jQuery(function ($) {
$('.govspeak').enhanceYoutubeVideoLinks()

GOVUK.worldLocationFilter.init()
GOVUK.hideDepartmentChildren.init()
GOVUK.filterListItems.init()
GOVUK.showHide.init()
})
// These want images to be loaded before they run so the page height doesn't change.
Expand Down
24 changes: 0 additions & 24 deletions app/assets/javascripts/frontend/world-location-filter.js

This file was deleted.

17 changes: 0 additions & 17 deletions app/helpers/world_location_helper.rb

This file was deleted.

4 changes: 0 additions & 4 deletions app/models/world_location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ def to_s
name
end

def self.all_by_type
ordered_by_name.in_order_of(:world_location_type, %w[world_location international_delegation]).group_by(&:world_location_type)
end

def self.countries
where(world_location_type: "world_location").ordered_by_name
end
Expand Down
9 changes: 7 additions & 2 deletions app/presenters/publishing_api/world_index_presenter.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module PublishingApi
class WorldIndexPresenter
include WorldLocationHelper

attr_accessor :update_type

def initialize(update_type: nil)
Expand Down Expand Up @@ -46,6 +44,13 @@ def base_path
"/world"
end

def sort(locations)
locations
.map { |location| [ActiveSupport::Inflector.transliterate(location.name_without_prefix), location] }
.sort_by { |transliterated_name, _location| transliterated_name.downcase }
.map { |_transliterated_name, location| location }
end

private

def format_locations(locations)
Expand Down
3 changes: 0 additions & 3 deletions app/views/world_locations/_legacy_list.html.erb

This file was deleted.

9 changes: 0 additions & 9 deletions app/views/world_locations/_list.html.erb

This file was deleted.

8 changes: 0 additions & 8 deletions app/views/world_locations/_world_location.html.erb

This file was deleted.

67 changes: 0 additions & 67 deletions app/views/world_locations/index.html.erb

This file was deleted.

Loading

0 comments on commit 608fc9d

Please sign in to comment.