<commit_before>- content_for?(:title) ? yield(:title) : "Queen's Awards for Enterprise"

- content_for :head do
  = stylesheet_link_tag "application.css"
  /[if IE 6]
    = stylesheet_link_tag "application-ie6.css"
    script type="text/javascript"
      | var ieVersion = 6;
  /[if IE 7]
    = stylesheet_link_tag "application-ie7.css"
    script type="text/javascript"
      | var ieVersion = 7;
  /[if IE 8]
    = stylesheet_link_tag "application-ie8.css"
    script type="text/javascript"
      | var ieVersion = 8;
  /[if IE 9]
    = stylesheet_link_tag "application-ie9.css"
    script type="text/javascript"
      | var ieVersion = 9;

  - if ENV["GOOGLE_ANALYTICS_ID"].present?
    / Google Analytics
    script
      | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
      | ga('create', '#{ENV["GOOGLE_ANALYTICS_ID"]}', 'auto');
      | ga('set', 'anonymizeIp', true);
      | ga('send', 'pageview');

  = csrf_meta_tags

  = yield :section_meta_tags

  = yield :head

- content_for :header_class do
  - unless landing_page?
    ' with-proposition

- content_for :body_start do
  .browser_warning
    ' We are currently in the beta phase and currently this browser is not supported
    br
    ' Please use
    = link_to "Chrome", "http://www.google.com/chrome/", target: "_blank"
    '  or
    = link_to "Firefox", "https://www.mozilla.org/firefox/", target: "_blank"
    '  to continue browsing this site

- content_for :cookie_message do
  .outer-block
    .inner-block
      p
        ' GOV.UK uses cookies to make the site simpler.
        = link_to "Find out more about cookies", cookies_path

- content_for :proposition_header do
  - unless landing_page?
    .header-proposition
      .content
        - if current_admin || current_user || current_assessor
          span.if-no-js-hide
            = link_to "Menu", "#proposition-links", class: "js-header-toggle menu"
        nav#proposition-menu
          a#proposition-name href="/"
            ' Queen's Awards for Enterprise
          - if current_user && !current_admin && !current_assessor
            ul#proposition-links
              - if current_user.try(:completed_registration)
                li
                  = link_to "Applications", dashboard_path
                li
                  = link_to "Account details", correspondent_details_account_path
                li
                  = link_to "Collaborators", account_collaborators_path
              li
                = link_to "Sign out", destroy_user_session_path, method: :delete

- content_for :inside_header do
  - if landing_page?
    = link_to "Search", "#search", class: "search-toggle js-header-toggle"
    form#search.site-search action="/search" method="get" role="search"
      .content
        label for="site-search-text"
          ' Search
        input.js-search-focus#site-search-text type="search" name="q" title="Search"
        input.submit type="submit" value="Search"

- content_for :content do
  = render "shared/offline_message"
  = render "shared/staging_banner"

  #wrapper.guide.smart-answer.answer class="#{yield :page_wrapper_class}"
    #QAE class="#{'admin-mode' if admin_in_read_only_mode?} #{'layout-dev' if Rails.env.development?}"
      main#content.group class="#{yield :page_content_class}" role="main"
        .phase-banner
          p
            strong.phase-tag
              ' BETA
            span
              ' This is a new service
              - if action_name != "feedback"
                ' – your
                = link_to "feedback", feedback_path, target: "_blank"
                '  will help us to improve it.

        - if !content_for?(:flash_disabled) && [:alert, :notice].any? { |kind| flash[kind].presence }
          .flash
            .flash-inner
              - [:alert, :notice].each do |kind|
                - if flash[kind]
                  div class="#{kind}"
                    = flash[kind]

        - if params[:session_expired].present?
          = render "shared/session_expired_message"

        - if landing_page?
          #global-breadcrumb.header-context
            ol.group role="navigation" aria-label="breadcrumbs"
              li = link_to "Home", "https://www.gov.uk/"
              - if action_name == "cookies" or action_name == "privacy"
                li = link_to "Help", "https://www.gov.uk/help/"
              - else
                li = link_to "Business and self-employed", "https://www.gov.uk/browse/business"
                li = link_to "Running a limited company", "https://www.gov.uk/browse/business/limited-company"

        = yield

        - unless landing_page?
          p.footer-helpline
            ' Need help? Ring us on
            strong 020 7215 6880
            ' . Alternatively, email us at
            = link_to "<EMAIL>", "mailto:<EMAIL>"

- content_for :footer_support_links do
  h2.visuallyhidden Support links
  ul
    li = link_to "Help", "https://www.gov.uk/help"
    li = link_to "Privacy Statement", privacy_path
    li
      ' Built by
      = link_to "The Queen's Awards Office", "http://blogs.bis.gov.uk/queensawards/"

- content_for :body_end do
  - if should_enable_js?
    = include_gon
    = javascript_include_tag 'application'

    - if ENV["GOOGLE_ANALYTICS_ID"].present?
      / Google Analytics
      script type="text/javascript"
        | if (!Cookies.get("gaoptout")) {
        |   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
        |   ga('create', '#{ENV["GOOGLE_ANALYTICS_ID"]}', 'auto');
        |   ga('set', 'anonymizeIp', true);
        |   ga('send', 'pageview');
        - if current_user
          | ga('set', 'userId', '#{current_user.id}');
        | }


= render :file => 'layouts/govuk_template'

- if should_enable_js?
  = javascript_tag "$(function() { #{yield(:javascript_code)} });" if content_for? :javascript_code
<commit_msg>remove duplicated GA script on production<commit_after>- content_for?(:title) ? yield(:title) : "Queen's Awards for Enterprise"

- content_for :head do
  = stylesheet_link_tag "application.css"
  /[if IE 6]
    = stylesheet_link_tag "application-ie6.css"
    script type="text/javascript"
      | var ieVersion = 6;
  /[if IE 7]
    = stylesheet_link_tag "application-ie7.css"
    script type="text/javascript"
      | var ieVersion = 7;
  /[if IE 8]
    = stylesheet_link_tag "application-ie8.css"
    script type="text/javascript"
      | var ieVersion = 8;
  /[if IE 9]
    = stylesheet_link_tag "application-ie9.css"
    script type="text/javascript"
      | var ieVersion = 9;

  = csrf_meta_tags

  = yield :section_meta_tags

  = yield :head

- content_for :header_class do
  - unless landing_page?
    ' with-proposition

- content_for :body_start do
  .browser_warning
    ' We are currently in the beta phase and currently this browser is not supported
    br
    ' Please use
    = link_to "Chrome", "http://www.google.com/chrome/", target: "_blank"
    '  or
    = link_to "Firefox", "https://www.mozilla.org/firefox/", target: "_blank"
    '  to continue browsing this site

- content_for :cookie_message do
  .outer-block
    .inner-block
      p
        ' GOV.UK uses cookies to make the site simpler.
        = link_to "Find out more about cookies", cookies_path

- content_for :proposition_header do
  - unless landing_page?
    .header-proposition
      .content
        - if current_admin || current_user || current_assessor
          span.if-no-js-hide
            = link_to "Menu", "#proposition-links", class: "js-header-toggle menu"
        nav#proposition-menu
          a#proposition-name href="/"
            ' Queen's Awards for Enterprise
          - if current_user && !current_admin && !current_assessor
            ul#proposition-links
              - if current_user.try(:completed_registration)
                li
                  = link_to "Applications", dashboard_path
                li
                  = link_to "Account details", correspondent_details_account_path
                li
                  = link_to "Collaborators", account_collaborators_path
              li
                = link_to "Sign out", destroy_user_session_path, method: :delete

- content_for :inside_header do
  - if landing_page?
    = link_to "Search", "#search", class: "search-toggle js-header-toggle"
    form#search.site-search action="/search" method="get" role="search"
      .content
        label for="site-search-text"
          ' Search
        input.js-search-focus#site-search-text type="search" name="q" title="Search"
        input.submit type="submit" value="Search"

- content_for :content do
  = render "shared/offline_message"
  = render "shared/staging_banner"

  #wrapper.guide.smart-answer.answer class="#{yield :page_wrapper_class}"
    #QAE class="#{'admin-mode' if admin_in_read_only_mode?} #{'layout-dev' if Rails.env.development?}"
      main#content.group class="#{yield :page_content_class}" role="main"
        .phase-banner
          p
            strong.phase-tag
              ' BETA
            span
              ' This is a new service
              - if action_name != "feedback"
                ' – your
                = link_to "feedback", feedback_path, target: "_blank"
                '  will help us to improve it.

        - if !content_for?(:flash_disabled) && [:alert, :notice].any? { |kind| flash[kind].presence }
          .flash
            .flash-inner
              - [:alert, :notice].each do |kind|
                - if flash[kind]
                  div class="#{kind}"
                    = flash[kind]

        - if params[:session_expired].present?
          = render "shared/session_expired_message"

        - if landing_page?
          #global-breadcrumb.header-context
            ol.group role="navigation" aria-label="breadcrumbs"
              li = link_to "Home", "https://www.gov.uk/"
              - if action_name == "cookies" or action_name == "privacy"
                li = link_to "Help", "https://www.gov.uk/help/"
              - else
                li = link_to "Business and self-employed", "https://www.gov.uk/browse/business"
                li = link_to "Running a limited company", "https://www.gov.uk/browse/business/limited-company"

        = yield

        - unless landing_page?
          p.footer-helpline
            ' Need help? Ring us on
            strong 020 7215 6880
            ' . Alternatively, email us at
            = link_to "<EMAIL>", "mailto:<EMAIL>"

- content_for :footer_support_links do
  h2.visuallyhidden Support links
  ul
    li = link_to "Help", "https://www.gov.uk/help"
    li = link_to "Privacy Statement", privacy_path
    li
      ' Built by
      = link_to "The Queen's Awards Office", "http://blogs.bis.gov.uk/queensawards/"

- content_for :body_end do
  - if should_enable_js?
    = include_gon
    = javascript_include_tag 'application'

    - if ENV["GOOGLE_ANALYTICS_ID"].present?
      / Google Analytics
      script type="text/javascript"
        | if (!Cookies.get("gaoptout")) {
        |   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
        |   ga('create', '#{ENV["GOOGLE_ANALYTICS_ID"]}', 'auto');
        |   ga('set', 'anonymizeIp', true);
        |   ga('send', 'pageview');
        - if current_user
          | ga('set', 'userId', '#{current_user.id}');
        | }


= render :file => 'layouts/govuk_template'

- if should_enable_js?
  = javascript_tag "$(function() { #{yield(:javascript_code)} });" if content_for? :javascript_code
{'fraction_non_alphanumeric': 0.13623733246158876, 'fraction_numerical': 0.004658385093167702, 'mean_word_length': 2.457756428369596, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 15, 'lorem ipsum': 0, 'www.': 17, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1444018', 'n_tokens_mistral': 3976, 'n_tokens_neox': 3817, 'n_words': 796}