<!DOCTYPE html>
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html> <!--<![endif]-->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link rel="shortcut icon" type="image/x-icon" href="<%= image_path('favicon.ico') -%>">
  <%
     if @page_title
       title="SonarQube - #{h(@page_title)}"
     elsif @project
       title="SonarQube - #{h(@project.name)}"
     elsif @resource
       title="#{h(@resource.long_name)}"
     else
       title='SonarQube'
     end
  %>
  <title><%= title -%></title>

  <link href="<%= ApplicationController.root_context -%>/css/sonar.css?v=<%= sonar_version -%>" rel="stylesheet" media="all">
  <%= yield :style -%>

  <script>
    var pageLang = '<%= I18n.locale.to_s.gsub(/-/, '_') -%>';
    <%# The two lines below mean that before full removal of Rails, we have to find a way to handle config properties %>
    window.SS = {
      hoursInDay: <%= configuration('sonar.technicalDebt.hoursInDay', 8) %>,
      user: '<%= escape_javascript current_user.login if logged_in? -%>',
      userName: '<%= escape_javascript current_user.name if logged_in? -%>',
      userEmail: '<%= escape_javascript current_user.email if logged_in? -%>',
      lf: {
        enableGravatar: <%= configuration('sonar.lf.enableGravatar', true) %>,
        gravatarServerUrl: '<%= configuration('sonar.lf.gravatarServerUrl') %>'
      },
      updateCenterActive: <%= configuration('sonar.updatecenter.activate', true) %>,
      'sonar.technicalDebt.ratingGrid': '<%= configuration('sonar.technicalDebt.ratingGrid', "0.05,0.1,0.2,0.5") %>'
    };
  </script>
  <script src="<%= ApplicationController.root_context -%>/js/bundles/vendor.js?v=<%= sonar_version -%>"></script>
  <script src="<%= ApplicationController.root_context -%>/js/bundles/sonar.js?v=<%= sonar_version -%>"></script>
  <script>
    window.baseUrl = '<%= ApplicationController.root_context -%>';
  </script>
  <%= yield :script -%>
</head>
<body>
