Skip to content

Commit

Permalink
Merge pull request #1081 from alphagov/deprecate-map-previews
Browse files Browse the repository at this point in the history
Deprecate map previews
  • Loading branch information
kentsanggds authored Jul 15, 2022
2 parents e0a6910 + 5a207a0 commit 08e2229
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/views/datasets/_datafile_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
<span class='visually-hidden'> CSV '<%= datafile.name %>', Dataset: <%= @dataset.title %></span>
<% end %>
<% elsif datafile.wms? && @dataset.inspire_dataset.present? %>
<%= link_to t('.map_preview'), map_preview_url(@dataset, datafile) %>
<!-- leaving this section in place to make it easier to add map previews in the future -->
<span class="dgu-secondary-text"><%= t('.not_available') %></span>
<% else %>
<span class="dgu-secondary-text"><%= t('.not_available') %></span>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions app/views/map_previews/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<%= link_to 'Back', :back, class: 'dgu-back-link govuk-link' %>
<% end %>

<div style="position: absolute; left:0; top: 0;color:yellow;z-index:100000000;width:100%;font-size:15pt;text-align:center;">Map previews on data.gov.uk have been retired. Please use an alternative method for viewing this map</div>
<main role="main" id="content">
<div class="grid-row inner">
<div class="column-two-thirds ">
Expand Down
4 changes: 3 additions & 1 deletion spec/features/dataset_show_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@
end

feature "Map preview links" do
scenario "WMS Resources have a link to map preview if we have inspire metadata" do
# skipping map preview test as it is being deprecated
# test left in place for future reimplementation of map previews
scenario "WMS Resources have a link to map preview if we have inspire metadata", skip: true do
dataset = build :dataset, :inspire, inspire_metadata: {}
index_and_visit(dataset)
expect(page).to have_content("Preview on map")
Expand Down

0 comments on commit 08e2229

Please sign in to comment.