ncbo/bioportal_web_ui

View on GitHub
app/views/layouts/_header.html.erb

Summary

Maintainability
Test Coverage
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="h-100">
<head>
    <%= render partial: 'ga_tracking' %>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />

    <!-- Force IE to use latest rendering engine -->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>

    <% unless Rails.env.appliance? %>
    <!-- Google Webmaster Tools verifications -->
      <meta name="google-site-verification" content="IBxfKu6VbYH9atd5OLu2zXVD2ZRWi9SgMKTi8nvw3ks" />
  <% end %>

    <%= csrf_meta_tag %>

    <title><%if @title.nil?%><%=$ORG_SITE%><%else%><%="#{@title} | #{$ORG_SITE}"%><%end%></title>

    <link rel="shortcut icon" href="/fav.ico" type="image/x-icon" />

    <!-- Fonts -->
    <link href='//fonts.googleapis.com/css?family=Droid+Sans:400' rel='stylesheet' type='text/css'>

    <!-- CSS -->
  <%= stylesheet_link_tag "https://use.fontawesome.com/releases/v5.2.0/css/all.css", integrity: "sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ", crossorigin: "anonymous" %>
  <%= stylesheet_link_tag "application" %>

  <!-- JavaScript -->
  <%= javascript_include_tag "application-esbuild", "data-turbo-track": "reload", type: "module" %>
  <%= javascript_include_tag "vendor" %>
  <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.min.js" %>
  <%= javascript_include_tag "//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js" %>
  <%= javascript_include_tag "//unpkg.com/split.js/dist/split.min.js" %>

  <script>
    jQuery(document).data({bp: {config: <%=bp_config_json.html_safe%>, user: <%=(session[:user] || {}).to_hash.to_json.html_safe%>}});
    jQuery(document).data().bp.ontology = <%=@ontology.to_json.html_safe%> || {};
    jQuery(document).data().bp.submission_latest = <%=@submission_latest.to_json.html_safe%> || {};
    jQuery(document).data().bp.ontolobridge_ontologies = <%=$NEW_TERM_REQUEST_ONTOLOGIES.to_json.html_safe%> || [];
    jQuery(document).data().bp.ont_viewer = {};
    jQuery(document).data().bp.ont_chart = {};
  </script>

  <!-- BioPortal-specific JavaScript is loaded in _footer.html.erb. -->  
</head>
<body class="<%= controller_name %> <%= action_name %> d-flex flex-column h-100">
  <header>
        <%=render partial: 'layouts/topnav'%>
    </header>
  
  <main class="flex-shrink-0">
        <div class="container-fluid">
            <%=render partial: 'layouts/notices'%>