Sha256: 475623f618be9bd751c924bba9a26a4d19a4c6f5b614c9fd707da68abca9fc1a

Contents?: true

Size: 1.29 KB

Versions: 15

Compression:

Stored size: 1.29 KB

Contents

module GovukPublishingComponents
  module Presenters
    class CookieBannerHelper
      attr_reader :local_assigns

      def initialize(local_assigns)
        @message = local_assigns[:message]
        @new_cookie_banner = local_assigns[:new_cookie_banner]
        @local_assigns = local_assigns
      end

      def confirmation_message
        'You\'ve accepted all cookies. You can <a class="govuk-link" href="/help/cookies" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner settings clicked from confirmation">change your cookie settings</a> at any time.'.html_safe
      end

      def message
        return @message if @message.present?

        if @new_cookie_banner
          "GOV.UK uses cookies to make the site simpler."
        else
          'GOV.UK uses cookies to make the site simpler. <a class="govuk-link" href="/help/cookies" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner clicked">Find out more about cookies</a> <span class="gem-c-cookie-banner__hide-link">or <a class="govuk-link" href="#" data-hide-cookie-banner="true" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner hidden">hide this message</a></span>'.html_safe
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
govuk_publishing_components-16.29.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.28.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.27.1 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.27.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.26.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.25.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.24.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.23.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.22.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.21.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.20.1 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.20.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.19.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.18.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb
govuk_publishing_components-16.17.0 lib/govuk_publishing_components/presenters/cookie_banner_helper.rb