govuk_publishing_components 9.15.0 → 9.16.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0a147f1861a972aec6b6868d1a3e7401757852c13c9b3fd0727164267e80bf2
4
- data.tar.gz: a768f5fff1607075fbd94b7e4c60d8b366dafce340978e7886093b998ddf697d
3
+ metadata.gz: 66460d0bda9d349279e8f56972ca5c9352da5596045ff45a661463f7821b43ed
4
+ data.tar.gz: 8769b2d1e95d7b55b27c9bf517fca8d93e63394aadb29d28383196300d2b182b
5
5
  SHA512:
6
- metadata.gz: f0f30603ae07987c94e09b68a85109dcb081675fece3bd9600ddf1b5a4f9a5eaefcee6adc3c2fa42804d67e78eb65a6a4b129644c49ceb94b09860409c96ac69
7
- data.tar.gz: 6ec17d5919eba4577d6bd6576145b3c87e002f64b9208ad66517093369eb9295848839f0807cae58c4e1ec28aa94f333fa538aae0af6e46886f7aa515afebbc1
6
+ metadata.gz: 2c5a17c49434fc3c1ea118126cd55d02d2dfc81cb4dcc809dcadf54596e8b8acfefeb712d1bbeac327ff6e9b7111e8d253d17e7341b0fd2e1708b34248dd0b53
7
+ data.tar.gz: 6e997e90d3f440701387b3bf0df17a612294308e7c55451e2c0cfd8bda85d370290ac723d3792e3ab8b6be152fd597311b002626c71a20dbd01e0aa3ccd56218
@@ -0,0 +1,14 @@
1
+ <%
2
+ gtm_auth ||= nil
3
+ gtm_preview ||= nil
4
+ %>
5
+ <script>
6
+ var doNotTrack = ( navigator.doNotTrack === '1' || navigator.doNotTrack === 'yes' || navigator.msDoNotTrack === '1' || window.doNotTrack === '1' )
7
+ if (!doNotTrack) {
8
+ (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
9
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
10
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
11
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl+'<%= "&gtm_auth="+gtm_auth if gtm_auth %><%= "&gtm_preview="+gtm_preview if gtm_preview %>&gtm_cookies_win=x';f.parentNode.insertBefore(j,f);
12
+ })(window,document,'script','dataLayer',<%= gtm_id %>);
13
+ }
14
+ </script>
@@ -28,6 +28,11 @@ examples:
28
28
  data:
29
29
  text: "I'm really a link sssh"
30
30
  href: "#"
31
+ link_button_target_blank:
32
+ data:
33
+ text: "I'm really a link sssh"
34
+ href: "http://www.gov.uk"
35
+ target: "_blank"
31
36
  start_now_button:
32
37
  data:
33
38
  text: "Start now"
@@ -0,0 +1,13 @@
1
+ name: Google Tag Manager script
2
+ description: |
3
+ Google Tag Manager script for tracking user interaction:
4
+ - gtm_id is the ID for the Google Tag Manager account
5
+ - gtm_preview allows a tag to be previewed in the Google Tag Manager interface
6
+ - gtm_auth is the identifier of an environment for Google Tag Manager
7
+ accessibility_criteria: |
8
+ The component should not be visible to any users.
9
+ display_html: true
10
+ examples:
11
+ default:
12
+ data:
13
+ gtm_id: GTM-XXXXXXX
@@ -4,7 +4,7 @@ module GovukPublishingComponents
4
4
  module Presenters
5
5
  class ButtonHelper
6
6
  attr_reader :href, :text, :title, :info_text, :rel, :data_attributes,
7
- :start, :secondary, :secondary_quiet, :margin_bottom
7
+ :start, :secondary, :secondary_quiet, :margin_bottom, :target
8
8
 
9
9
  def initialize(local_assigns)
10
10
  @href = local_assigns[:href]
@@ -17,6 +17,7 @@ module GovukPublishingComponents
17
17
  @secondary = local_assigns[:secondary]
18
18
  @secondary_quiet = local_assigns[:secondary_quiet]
19
19
  @margin_bottom = local_assigns[:margin_bottom]
20
+ @target = local_assigns[:target]
20
21
  end
21
22
 
22
23
  def link?
@@ -30,6 +31,7 @@ module GovukPublishingComponents
30
31
  options[:rel] = rel if rel
31
32
  options[:data] = data_attributes if data_attributes
32
33
  options[:title] = title if title
34
+ options[:target] = target if target
33
35
  options
34
36
  end
35
37
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '9.15.0'.freeze
2
+ VERSION = '9.16.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.15.0
4
+ version: 9.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-16 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -449,6 +449,7 @@ files:
449
449
  - app/views/govuk_publishing_components/components/_error_summary.html.erb
450
450
  - app/views/govuk_publishing_components/components/_feedback.html.erb
451
451
  - app/views/govuk_publishing_components/components/_fieldset.html.erb
452
+ - app/views/govuk_publishing_components/components/_google_tag_manager_script.html.erb
452
453
  - app/views/govuk_publishing_components/components/_government_navigation.html.erb
453
454
  - app/views/govuk_publishing_components/components/_govspeak.html.erb
454
455
  - app/views/govuk_publishing_components/components/_govspeak_html_publication.html.erb
@@ -500,6 +501,7 @@ files:
500
501
  - app/views/govuk_publishing_components/components/docs/error_summary.yml
501
502
  - app/views/govuk_publishing_components/components/docs/feedback.yml
502
503
  - app/views/govuk_publishing_components/components/docs/fieldset.yml
504
+ - app/views/govuk_publishing_components/components/docs/google_tag_manager_script.yml
503
505
  - app/views/govuk_publishing_components/components/docs/government_navigation.yml
504
506
  - app/views/govuk_publishing_components/components/docs/govspeak.yml
505
507
  - app/views/govuk_publishing_components/components/docs/govspeak_html_publication.yml