ministryofjustice/Claim-for-Crown-Court-Defence

View on GitHub
app/views/layouts/_cookie_banner.html.haml

Summary

Maintainability
Test Coverage
- unless @cookies_preferences_set
  .govuk-cookie-banner{ role: 'region', 'aria-label': t('.title'), 'tab-index': '-1', 'data-nosnippet': true }
    .govuk-cookie-banner__message.govuk-width-container

      .govuk-grid-row
        .govuk-grid-column-two-thirds
          %h2.govuk-cookie-banner__heading.govuk-heading-m
            = t('.title')

          .govuk-cookie-banner__content
            = t('.content_html')

      .govuk-button-group
        = govuk_link_button(t('.accept_button'), '?usage_opt_in=true&show_confirmation=true')
        = govuk_link_button(t('.reject_button'), '?usage_opt_in=false&show_confirmation=true')

        = govuk_link_to(t('.view_cookies'), cookies_path)

- if @show_confirm_banner == "true"
  .govuk-cookie-banner{ role: 'alert', 'aria-label': t('.title'), 'tab-index': '-1', 'data-nosnippet': true }
    .govuk-cookie-banner__confirmation.govuk-width-container
      .govuk-grid-row
        .govuk-grid-column-two-thirds

          .govuk-cookie-banner__content
            = t('.cookie_confirmation_html', link: cookies_path)

      .govuk-button-group
        = govuk_link_button(t('.hide_button'), '?show_confirmation=false')