Skip to content

Commit d837b10

Browse files
committed
Update content to use business.gov.uk
1 parent c21d3da commit d837b10

30 files changed

+54
-39
lines changed

app/controllers/application_controller.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
require 'yaml'
22

33
class ApplicationController < ActionController::Base
4+
include DomainHelper
45
# for how many days should we notify pingdom that a volume opps job has failed
56
PUBLISH_SIDEKIQ_ERROR_DAYS = 1.freeze
67

app/helpers/domain_helper.rb

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module DomainHelper
2+
def is_bgs_site?(title_only = false)
3+
if Figaro.env.DOMAIN == Figaro.env.BGS_SITE_DOMAIN
4+
if title_only
5+
"Business"
6+
else
7+
"business.gov.uk"
8+
end
9+
else
10+
if title_only
11+
"Great"
12+
else
13+
"great.gov.uk"
14+
end
15+
end
16+
end
17+
end

app/mailers/application_mailer.rb

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
require 'yaml'
44

55
class ApplicationMailer < ActionMailer::Base
6+
include DomainHelper
7+
68
after_action :subject_to_ascii!
79
layout 'email'
810

app/presenters/base_presenter.rb

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ class BasePresenter < ActionView::Base
22
include Rails.application.routes.url_helpers
33
include ActionView::Helpers::TagHelper
44

5+
include DomainHelper
6+
57
def initialize; end
68

79
def put(value, default = 'none')

app/presenters/opportunity_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def country_guides
9595
links = []
9696
if guides.length > 5
9797
links.push(h.link_to('Country guides',
98-
'https://www.great.gov.uk/markets/',
98+
"https://www.#{is_bgs_site?}/markets/",
9999
target: '_blank', rel: 'noopener noreferrer', title: 'Opens in a new window'))
100100
else
101101
guides.each do |country|

app/presenters/page_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def highlight_words(content, words)
3131

3232
def create_breadcrumbs
3333
[
34-
{ title: 'great.gov.uk', slug: Figaro.env.EXPORT_READINESS_URL },
34+
{ title: is_bgs_site?, slug: Figaro.env.EXPORT_READINESS_URL },
3535
{ title: 'Export Opportunities', slug: Figaro.env.EXPORT_OPPORTUNITIES_URL },
3636
]
3737
end

app/views/admin/help/how_to_assess_a_company.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ SECTION
1616
<li>all relevant company information in its proposal (UK registered address, phone number and <a href="https://beta.companieshouse.gov.uk/">Companies House details</a>) is included</li>
1717
<li>the phone number and address in its proposal, website and Companies House profile all match</li>
1818
<li>it is actively trading - use Companies House for this</li>
19-
<li>it has an <a href="https://trade.great.gov.uk/">EIG trade profile</a> - but just because a company may not have one, does not automatically mean it is not eligible</li>
19+
<li>it has an <a href="https://www.#{is_bgs_site?}/international/buy-from-the-uk/">EIG trade profile</a> - but just because a company may not have one, does not automatically mean it is not eligible</li>
2020
</ul>
2121
SECTION
2222

app/views/admin/help/not_right_for_opportunity_responses.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ SECTION
4646
@article.section "The company is not ready to export in this market or not ready to export at all", <<-SECTION
4747
<p>You will need to:</p>
4848
<ul>
49-
<li>explain why you think it is not ready to export and direct them to <a href="https://www.great.gov.uk/new/">New To Exporting</a></li>
49+
<li>explain why you think it is not ready to export and direct them to <a href="https://www.#{is_bgs_site?}/new/">New To Exporting</a></li>
5050
</ul>
5151
<p class="examples-list-label">Use sentences such as:</p>
5252
<ul class="examples-list">

app/views/admin/updates/index.html.haml

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@
8080

8181
%dl.update
8282
%dt
83-
Launch of a new look #{link_to 'great.gov.uk', 'https://www.great.gov.uk'}
83+
Launch of a new look #{link_to is_bgs_site?, "https://www.#{is_bgs_site?}"}
8484
%span.verbose ,
8585
%span.date 11 December
86-
%dd.change a filter tool as part of a new #{link_to 'great.gov.uk', 'https://www.great.gov.uk'} design, to help UK companies apply for opportunities for which they are most suitable
86+
%dd.change a filter tool as part of a new #{link_to is_bgs_site?, "https://www.#{is_bgs_site?}"} design, to help UK companies apply for opportunities for which they are most suitable
8787

8888
%dl.update
8989
%dt

app/views/enquiry_response_mailer/reminder.text.erb

+1-8
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,4 @@ Department for Business and Trade
2424
<%= presenter.content_with_inclusion 'contact_help', ['[email protected]'] %>
2525

2626

27-
28-
29-
The Exporting is GREAT team
30-
31-
www.great.gov.uk
32-
33-
Exporting is GREAT
34-
27+
<%= "www.#{ApplicationController.new.is_bgs_site?}" %>

app/views/feedback_opt_outs/create.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
%p.large
55
You will no longer receive requests for feedback
66
%p
7-
If you have more to say on the service, #{link_to 'complete our short feedback form', 'https://contact-us.export.great.gov.uk/feedback/export_ops/'}.
7+
If you have more to say on the service, #{link_to 'complete our short feedback form', "https://www.#{is_bgs_site?}/contact/feedback/"}.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
%meta{:charset => "utf-8"}
22
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}
33
%link{:href => "#{asset_path('favicon-lg.png')}", :rel => 'icon', :type => 'image/x-icon'}
4-
/[if IE] <link rel="shortcut icon" href="https://www.export.great.gov.uk/images/favicon.ico" type="image/x-icon">
4+
/[if IE] <link rel="shortcut icon" href="https://www.#{is_bgs_site?}/images/favicon.ico" type="image/x-icon">

app/views/includes/_transformation_head_tags.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
%meta{:content => "UsYPpFjZgK_HPJX0BmyaiSEFr6VDk-8kD4NARXzhhCE", :name => "google-site-verification"}
44
%link{:href => "#{asset_path('favicon-lg.png')}", :rel => 'icon', :type => 'image/x-icon'}
55
= render 'shared/cookie_domain_meta'
6-
/[if IE] <link rel="shortcut icon" href="https://www.export.great.gov.uk/images/favicon.ico" type="image/x-icon">
6+
/[if IE] <link rel="shortcut icon" href="https://www.#{is_bgs_site?}/images/favicon.ico" type="image/x-icon">

app/views/layouts/application.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
%meta{:content => "UsYPpFjZgK_HPJX0BmyaiSEFr6VDk-8kD4NARXzhhCE", :name => "google-site-verification"}
1212

1313
%link{href: "#{asset_path('favicon-lg.png')}", rel: 'icon', type: 'image/x-icon'}
14-
/[if IE] <link rel="shortcut icon" href="https://www.export.great.gov.uk/images/favicon.ico" type="image/x-icon">
14+
/[if IE] <link rel="shortcut icon" href="https://www.#{is_bgs_site?}/images/favicon.ico" type="image/x-icon">
1515

1616
:css
1717
svg.icon {

app/views/layouts/eig-email-survey.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
<div><%= yield :message_reason_survey %></div>
350350
<% end %>
351351
<div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:#333333;text-align:center;line-height:120%;">
352-
<div style="line-height:120%; margin-bottom: 6px;">You are receiving this email <br>because you applied for an opportunity on the <a href="https://great.gov.uk" style="color:#0a569d">great.gov.uk</a> website.</div>
352+
<div style="line-height:120%; margin-bottom: 6px;">You are receiving this email <br>because you applied for an opportunity on the <a href=<%= "https://#{ApplicationController.new.is_bgs_site?}" %> style="color:#0a569d"><%= is_bgs_site? %></a> website.</div>
353353
<% if content_for(:footer_links) %>
354354
<%= yield :footer_links %>
355355
<% end %>

app/views/layouts/eig-email.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
<% end %>
355355

356356
<div><a href="<%=Figaro.env.PRIVACY_AND_COOKIES_URL %>">See the privacy statement to see how we keep your data and privacy safe</a></div>
357-
<div><a href="https://contact-us.export.great.gov.uk/opportunities">Give feedback on this service</a></div>
357+
<div><a href=<%="https://#{ApplicationController.new.is_bgs_site?}/support/export-support/"%>>Give feedback on this service</a></div>
358358
</div>
359359

360360
</td>

app/views/layouts/enquiries.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<% @page_type = 'EnquiriesPage' %>
55

6-
<title>Express interest - <%= @opportunity.title %> - <%= t('site_name') %> - great.gov.uk</title>
6+
<title>Express interest - <%= @opportunity.title %> - <%= t('site_name') %> - <%= is_bgs_site? %> </title>
77
<%= csrf_meta_tags %>
88
<%= render partial: 'includes/transformation_head_tags' %>
99
<%= render partial: 'includes/transformation_styles' %>

app/views/layouts/landing.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<% @page_type = 'LandingPage' %>
44

55
<head>
6-
<title><%= t('site_name') %> - great.gov.uk</title>
6+
<title><%= t('site_name') %> - <%= is_bgs_site? %> </title>
77
<%= csrf_meta_tags %>
88
<%= canonical_tag root_url %>
99
<%= hreflang_tags root_url %>

app/views/layouts/notification.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<% @page_type = 'NotificationPage' %>
44

55
<head>
6-
<title><%= @title %> - <%= t('site_name') %> - great.gov.uk</title>
6+
<title><%= @title %> - <%= t('site_name') %> - <%= is_bgs_site? %> </title>
77
<%= csrf_meta_tags %>
88
<%= render partial: 'includes/transformation_head_tags' %>
99
<%= render partial: 'includes/transformation_styles' %>

app/views/layouts/opportunity.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<% @page_type = 'OpportunityPage' %>
55

6-
<title><%= @opportunity.title %> - <%= t('site_name') %> - great.gov.uk</title>
6+
<title><%= @opportunity.title %> - <%= t('site_name') %> - <%= is_bgs_site? %> </title>
77
<%= csrf_meta_tags %>
88
<%= render partial: 'includes/transformation_head_tags' %>
99
<%= render partial: 'includes/transformation_styles' %>

app/views/layouts/results.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<% @page_type = 'SearchResultsPage' %>
55

6-
<title>Search results - <%= t('site_name') %> - great.gov.uk</title>
6+
<title>Search results - <%= t('site_name') %> - <%= is_bgs_site? %> </title>
77
<%= csrf_meta_tags %>
88
<%= canonical_tag opportunities_url %>
99
<%= hreflang_tags opportunities_url %>

app/views/opportunity_mailer/unsubscription_confirmation.html.haml

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
= link_to "Export Opportunities service", root_url + ApplicationController.new.ga360_campaign_parameters('email_alerts','email','exportOps_unsubscribe','visitOps')
1818
and type in the product or service you're interested in. You will then be prompted to sign up for email alerts for this search term.
1919
%li{ style: "margin-bottom:15px;" }
20-
You will be asked to sign into your great.gov.uk account to complete the process. If you don't have an account you will be prompted to create one.
21-
20+
You will be asked to sign into your #{ApplicationController.new.is_bgs_site?} account to complete the process. If you don't have an account you will be prompted to create one.
2221
2322
- content_for :email_sub_footer do
2423
%table{ border: "0", cellpadding: "30", cellspacing: "0", width: "600" }

app/views/opportunity_mailer/unsubscription_confirmation.text.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To set new email alerts for specific opportunities:
1212

1313
1. Visit the Export Opportunities service and type in the product or service you're interested in. You will then be prompted to sign up for email alerts for this search term.
1414

15-
2. You will be asked to sign into your great.gov.uk account to complete the process. If you don't have an account you will be prompted to create one.
15+
2. You will be asked to sign into your <%= "#{ApplicationController.new.is_bgs_site?}" %> account to complete the process. If you don't have an account you will be prompted to create one.
1616

1717

1818

app/views/poc/includes/_footer_domestic.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<div class="container">
4646
<ul class="navigation">
4747
<li><a href="<%=Figaro.env.GREAT_GOV_URL %>/about">About</a></li>
48-
<li><a href="https://contact-us.export.great.gov.uk/directory/FeedbackForm">Contact us</a></li>
48+
<li><a href=<%="https://www.#{is_bgs_site?}/contact/feedback/" %>%>Contact us</a></li>
4949
<li><a href="<%=Figaro.env.PRIVACY_AND_COOKIES_URL %>/privacy-and-cookies">Privacy and cookies</a></li>
5050
<li><a href="<%=Figaro.env.GREAT_GOV_URL %>/terms-and-conditions">Terms and conditions</a></li>
5151
<li><a href="https://www.gov.uk/government/organisations/department-for-business-and-trade">Department for Business and Trade on GOV.UK</a></li>

app/views/poc/includes/_footer_international.html.erb

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434

3535
<p data-component="sharing-links" class="sharing-links">
3636
<span class="label">Share </span>
37-
<%= link_to "https://twitter.com/intent/tweet?text=Welcome%20to%20the%20UK%20https://www.great.gov.uk/international/?lang=en-gb" do %>
37+
<%= link_to "https://twitter.com/intent/tweet?text=Welcome%20to%20the%20UK%20https://www.#{is_bgs_site?}/international/?lang=en-gb" do %>
3838
<%= image_tag "logos/twitter.svg", :width=>"36px", :alt=>"with Twitter" %>
3939
<% end %>
4040
<span class="verbose">, </span>
41-
<%= link_to "https://www.facebook.com/share.php?u=https://www.great.gov.uk/international/?lang=en-gb" do %>
41+
<%= link_to "https://www.facebook.com/share.php?u=https://www.#{is_bgs_site?}/international/?lang=en-gb" do %>
4242
<%= image_tag "logos/facebook.svg", :width=>"36px", :alt=>"with Facebook" %>
4343
<% end %>
4444
<span class="verbose">, </span>
45-
<%= link_to "https://www.linkedin.com/shareArticle?mini=true&amp;url=https://www.great.gov.uk/international/?lang=en-gb&amp;title=Welcome%20to%20the%20UK&amp;source=LinkedIn" do %>
45+
<%= link_to "https://www.linkedin.com/shareArticle?mini=true&amp;url=https://www.#{is_bgs_site?}/international/?lang=en-gb&amp;title=Welcome%20to%20the%20UK&amp;source=LinkedIn" do %>
4646
<%= image_tag "logos/linkedin.svg", :width=>"36px", :alt=>"with LinkedIn" %>
4747
<% end %>
4848
<span class="verbose">, </span>
49-
<%= link_to "mailto:?body=https://www.great.gov.uk/international/?lang=en-gb&amp;subject=Welcome%20to%20the%20UK" do %>
49+
<%= link_to "mailto:?body=https://www.#{is_bgs_site?}/international/?lang=en-gb&amp;subject=Welcome%20to%20the%20UK" do %>
5050
<%= image_tag "logos/email.svg", :width=>"36px", :alt=>"by email" %>
5151
<% end %>
5252
</p>

app/views/poc/includes/_header_domestic.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<li><a href="#services-links-list" id="header-services-links" class="list-header">Services</a>
5555
<ul id="services-links-list" aria-labelledby="header-services-links" class="navigation level-2">
5656
<li class="items-5">
57-
<a id="header-services-find-a-buyer" href="<%=Figaro.env.FIND_A_BUYER_URL %>">Create an export profile</a><span class="description">Get promoted internationally with a great.gov.uk trade profile</span>
57+
<a id="header-services-find-a-buyer" href="<%=Figaro.env.FIND_A_BUYER_URL %>">Create an export profile</a><span class="description">Get promoted internationally with a <%= is_bgs_site? %> trade profile</span>
5858
</li>
5959
<li class="items-5">
6060
<a id="header-services-selling-online-overseas" href="<%=Figaro.env.SELLING_ONLINE_OVERSEAS_URL %>">Sell online overseas</a><span class="description">Find the right marketplace for your business and access special offers for sellers</span>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<% privacy_cookie_domain = Figaro.env.PRIVACY_COOKIE_DOMAIN || '.great.gov.uk' %>
1+
<% privacy_cookie_domain = Figaro.env.PRIVACY_COOKIE_DOMAIN || ".#{is_bgs_site?}" %>
22
<meta id="privacyCookieDomain" value="<%= privacy_cookie_domain %>">
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div id="header-cookie-notice" class="cookie-notice">
22
<div class="container cookie-notice-container">
3-
<p>Great.gov.uk uses cookies to make the site simpler. <a class="link" href="<%=Figaro.env.GREAT_GOV_URL %>/privacy-and-cookies">Find out more about cookies</a>
3+
<p><%= is_bgs_site?.capitalize %> uses cookies to make the site simpler. <a class="link" href="<%=Figaro.env.GREAT_GOV_URL %>/privacy-and-cookies">Find out more about cookies</a>
44
</p>
55
</div>
66
</div>

app/views/shared/_migration_banner.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div role="img" alt="alert icon" class="exclamation-circle"></div>
44
<div>
55
<p class="great-inline great-text-white">
6-
Great.gov.uk Export Opportunities service will be unavailable on Wednesday 12 March 2025 between 7:00-9:00am UK time whilst we carry out essential maintenance.
6+
<%= is_bgs_site?.capitalize %> Export Opportunities service will be unavailable on Wednesday 12 March 2025 between 7:00-9:00am UK time whilst we carry out essential maintenance.
77
</p>
88
</div>
99
</div>

config/application.example.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
# Canonical URL
88
DOMAIN: "http://localhost:3000"
9+
BGS_SITE_DOMAIN: "www.business.gov.uk"
910

1011
# Sending email
1112
MAILER_HOST: "127.0.0.1"
@@ -15,11 +16,11 @@ MAILER_NOREPLY_ADDRESS: '[email protected]'
1516
MAILER_DOMAIN: 'c'
1617

1718
# Redis
18-
REDIS_URL: redis://localhost:6379
19+
REDIS_URL: rredis://localhost:6379
1920

2021
#use a different database for testing
2122
test:
22-
REDIS_URL: redis://localhost:6379/7
23+
REDIS_URL: redis://localhost:6379
2324

2425
COMPANIES_HOUSE_API_TOKEN: example_token
2526
COMPANIES_HOUSE_BASE_URL:

0 commit comments

Comments
 (0)