Skip to content

Commit

Permalink
Merge pull request #2230 from alphagov/remove-save-a-page
Browse files Browse the repository at this point in the history
Remove save a page
  • Loading branch information
huwd authored Sep 29, 2021
2 parents 535345a + d15d1e0 commit 4558c55
Show file tree
Hide file tree
Showing 100 changed files with 2 additions and 1,162 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gem "dalli"
gem "gds-api-adapters"
gem "govuk_ab_testing"
gem "govuk_app_config"
gem "govuk_personalisation"
gem "govuk_publishing_components"
gem "htmlentities"
gem "plek"
Expand Down
5 changes: 2 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ GEM
faraday-patron (1.0.0)
faraday-rack (1.0.0)
ffi (1.13.1)
gds-api-adapters (73.1.0)
gds-api-adapters (75.0.0)
addressable
link_header
null_logger
Expand Down Expand Up @@ -373,7 +373,7 @@ GEM
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unf_ext (0.0.8)
unicode-display_width (2.1.0)
unicorn (5.8.0)
kgio (~> 2.6)
Expand Down Expand Up @@ -416,7 +416,6 @@ DEPENDENCIES
gds-api-adapters
govuk_ab_testing
govuk_app_config
govuk_personalisation
govuk_publishing_components
govuk_schemas
govuk_test
Expand Down
9 changes: 0 additions & 9 deletions app/assets/stylesheets/components/_save-this-page.scss

This file was deleted.

22 changes: 0 additions & 22 deletions app/controllers/content_items_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class ContentItemsController < ApplicationController
include GovukPersonalisation::ControllerConcern
include Slimmer::Template
include AbTests::ExploreMenuAbTestable
include AbTests::SabPagesTestable
Expand Down Expand Up @@ -217,25 +216,4 @@ def error_redirect(exception)
)
redirect_to destination, status: status_code
end

def save_this_page_enabled?
ENV["FEATURE_FLAG_SAVE_A_PAGE"] == "enabled"
end
helper_method :save_this_page_enabled?

helper_method :logged_in?

def user_has_saved_page?
return false unless @account_session_header

GdsApi.account_api.get_saved_page(
page_path: request.path,
govuk_account_session: @account_session_header,
).to_hash["saved_page"].present?
rescue GdsApi::HTTPNotFound
false
rescue GdsApi::HTTPUnauthorized
logout!
end
helper_method :user_has_saved_page?
end
12 changes: 0 additions & 12 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ def current_path_without_query_string
request.original_fullpath.split("?", 2).first
end

def has_saved_page_confirmation?
return false unless save_this_page_enabled?

personalisation_param.present?
end

def personalisation_param
return unless %w[page_saved page_removed].include?(params["personalisation"])

params["personalisation"]
end

private

def active_proposition_mapping
Expand Down
32 changes: 0 additions & 32 deletions app/helpers/save_this_page_helper.rb

This file was deleted.

14 changes: 0 additions & 14 deletions app/views/components/_save_this_page.html.erb

This file was deleted.

25 changes: 0 additions & 25 deletions app/views/components/docs/save_this_page.yml

This file was deleted.

2 changes: 0 additions & 2 deletions app/views/content_items/_body_with_related_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
} %>
<% end %>
</div>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
7 changes: 0 additions & 7 deletions app/views/content_items/_save_page.html.erb

This file was deleted.

2 changes: 0 additions & 2 deletions app/views/content_items/case_study.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
history: @content_item.history
} %>
</div>

<%= render 'content_items/save_page' %>
</div>

<%= render 'shared/sidebar_navigation' %>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/consultation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@
history: @content_item.history
} %>
</div>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/contact.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@
<%= body %>
<% end %>
</div>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
7 changes: 0 additions & 7 deletions app/views/content_items/corporate_information_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,3 @@
</div>
</div>
</div>
<% if save_this_page_enabled? %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render 'content_items/save_page' %>
</div>
</div>
<% end %>
2 changes: 0 additions & 2 deletions app/views/content_items/detailed_guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
margin_top: 0,
margin_bottom: 6,
} unless brexit_child_taxon %>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/document_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
} %>
</div>
<% end %>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
1 change: 0 additions & 1 deletion app/views/content_items/fatality_notice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
history: @content_item.history
} %>
</div>
<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
1 change: 0 additions & 1 deletion app/views/content_items/html_publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<%= render "govuk_publishing_components/components/govspeak_html_publication", {} do %>
<%= raw(@content_item.govspeak_body[:content]) %>
<% end %>
<%= render 'content_items/save_page' %>
</div>

<div data-sticky-element class="sticky-element">
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/news_article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
history: @content_item.history
} %>
</div>

<%= render 'content_items/save_page' %>
</div>

<%= render 'shared/sidebar_navigation' %>
Expand Down
1 change: 0 additions & 1 deletion app/views/content_items/publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
history: @content_item.history
} %>
</div>
<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/specialist_document.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
</div>
<% end %>
<% end %>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/speech.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
history: @content_item.history
} %>
</div>

<%= render 'content_items/save_page' %>
</div>

<%= render 'shared/sidebar_navigation' %>
Expand Down
1 change: 0 additions & 1 deletion app/views/content_items/statistical_data_set.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
} %>
</div>
<% end %>
<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/statistics_announcement.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
<%= render 'govuk_publishing_components/components/notice',
title: nbsp_between_last_two_words(@content_item.forthcoming_notice_title) %>
<% end %>

<%= render 'content_items/save_page' %>
</div>
<div class="govuk-grid-column-one-third">
<%= render 'govuk_publishing_components/components/related_navigation', content_item: @content_item.content_item.parsed_content, context: :sidebar %>
Expand Down
1 change: 0 additions & 1 deletion app/views/content_items/take_part.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<%= raw(@content_item.body) %>
<% end %>
</div>
<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/topical_event_about_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
<%= raw(@content_item.body) %>
<% end %>
<% end %>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/travel_advice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@
<div class="responsive-bottom-margin">
<%= render 'govuk_publishing_components/components/print_link', href: @content_item.print_link, text: t("multi_page.print_entire_guide") %>
</div>

<%= render 'content_items/save_page' %>
</div>
<%= render 'shared/sidebar_navigation' %>
</div>
Expand Down
2 changes: 0 additions & 2 deletions app/views/content_items/working_group.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@
<%= raw(@additional_body) %>
<% end %>
<% end %>

<%= render 'content_items/save_page' %>
</div>
</div>
2 changes: 0 additions & 2 deletions app/views/content_items/world_location_news_article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
history: @content_item.history
} %>
</div>

<%= render 'content_items/save_page' %>
</div>

<%= render 'shared/sidebar_navigation' %>
Expand Down
2 changes: 0 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
<%= render 'govuk_publishing_components/components/phase_banner', phase: @content_item.phase %>
<% end %>

<%= render 'shared/save_page_confirmation' %>

<% unless @do_not_show_breadcrumbs %>
<% if @content_item.try(:back_link) %>
<%= render 'govuk_publishing_components/components/back_link', href: @content_item.back_link %>
Expand Down
15 changes: 0 additions & 15 deletions app/views/shared/_save_page_confirmation.html.erb

This file was deleted.

12 changes: 0 additions & 12 deletions config/locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,6 @@ ar:
from:
hide_all:
show_all:
save_this_page:
add_page_button:
confirmations:
page_removed:
message:
page_saved:
message:
page_not_saved_heading:
page_was_saved_heading:
remove_page_button:
see_saved_pages_signed_in:
see_saved_pages_signed_out:
share_links:
share_this_page: شارك هذه الصفحة
consultation:
Expand Down
Loading

0 comments on commit 4558c55

Please sign in to comment.