MITLibraries/QuickSubmit

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

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><%= content_for?(:title) ? yield(:title) : "Public Access QuickSubmit" %></title>
    <%= csrf_meta_tags %>

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
      <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script>
    <![endif]-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.1.1/normalize.min.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic&subset=latin,latin-ext" type="text/css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">

    <%= stylesheet_link_tag "application", :media => "all" %>

    <%= javascript_include_tag "application" %>
  </head>
  <body>

  <a id="skip" class="skip sr sr-focusable" href="#content-main">Skip to main content</a>

  <div class="wrap-page">
    <div class="wrap-outer-header layout-band">
      <div class="wrap-header">
        <header class="header-site header-slim">
          <div class="wrap-header-core">
            <h1 class="name-site group nav-logo">
              <a href="http://libraries.mit.edu/" class="logo-mit-lib" alt="MIT Libraries Logo">
              <span class="sr">MIT Libraries home</span>
                <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="128.027" height="53.766" viewBox="0 0 128.027 53.766" enable-background="new 0 0 128.027 53.766" xml:space="preserve"><polygon points="0,53.486 0,29.308 5.919,29.308 8.671,45.75 8.72,45.75 11.643,29.308 17.367,29.308 17.367,53.486 13.787,53.486   13.787,34.833 13.738,34.833 10.352,53.486 6.845,53.486 3.629,34.833 3.581,34.833 3.581,53.486 "/><rect x="20.662" y="29.308" width="3.678" height="24.179"/><polygon points="37.659,29.308 37.659,33.326 33.567,33.326 33.567,53.486 29.889,53.486 29.889,33.326 25.797,33.326   25.797,29.308 "/><polygon points="40.547,53.43 40.547,29.249 42.691,29.249 42.691,51.621 50.695,51.621 50.695,53.43 "/><path d="M52.535 36.517h2.01V53.43h-2.01V36.517zM52.3 29.249h2.478v2.545H52.3V29.249z"/><path d="M57.154 53.431c0.101-0.57 0.201-1.106 0.201-1.676V29.249h2.01v9.176l0.067 0.067c1.037-1.606 2.377-2.311 4.286-2.311 5.493 0 5.058 5.761 5.058 8.774 0 3.719-0.301 8.81-5.225 8.81 -1.976 0-3.416-0.804-4.253-2.378h-0.067v2.043H57.154zM62.948 52.157c3.718 0 3.818-3.182 3.818-7.134s-0.101-7.233-3.818-7.233c-3.249 0-3.65 4.387-3.65 6.933C59.298 47.401 59.298 52.157 62.948 52.157"/><path d="M72.79 38.794h0.066c0.838-1.607 2.613-2.611 4.656-2.611v2.043c-2.847-0.235-4.723 1.474-4.723 4.319v10.886h-2.01V36.517h2.01V38.794z"/><path d="M86.852 51.353h-0.067c-1.072 1.608-2.713 2.412-4.789 2.412 -3.015 0-4.656-2.043-4.656-4.99 0-5.929 5.963-5.325 9.377-5.592v-1.408c0-2.478-0.735-3.985-3.414-3.985 -1.844 0-3.317 0.905-3.317 2.914h-2.144c0.168-3.249 2.68-4.521 5.627-4.521 1.709 0 5.259 0.166 5.259 4.487v8.507c0 1.205 0 2.277 0.2 4.254h-2.075V51.353zM86.716 44.789c-2.879 0.101-7.233-0.233-7.233 3.885 0 1.909 0.972 3.483 3.048 3.483 2.311 0 4.186-2.076 4.186-4.287V44.789z"/><path d="M93.61 38.794h0.067c0.839-1.607 2.613-2.611 4.656-2.611v2.043c-2.847-0.235-4.724 1.474-4.724 4.319v10.886h-2.01V36.517h2.01V38.794z"/><path d="M99.936 36.517h2.009V53.43h-2.009V36.517zM99.7 29.249h2.479v2.545H99.7V29.249z"/><path d="M106.765 45.393v1.306c0 2.344 0.637 5.459 3.818 5.459 2.512 0 3.752-1.607 3.719-3.885h2.109c-0.234 4.086-2.445 5.492-5.828 5.492 -2.914 0-5.827-1.172-5.827-6.296v-4.153c0-4.89 2.043-7.134 5.827-7.134 5.828 0 5.828 4.187 5.828 9.211H106.765zM114.401 43.784c0-3.751-0.603-5.994-3.818-5.994 -3.215 0-3.818 2.243-3.818 5.994H114.401z"/><path d="M123.038 53.765c-3.651 0-5.092-1.774-5.058-5.358h2.043c0 2.312 0.535 3.852 3.114 3.852 1.943 0 2.88-1.104 2.88-2.981 0-4.42-7.603-3.281-7.603-8.875 0-3.114 2.144-4.219 5.092-4.219 3.349 0 4.42 2.311 4.42 4.889h-1.977c-0.1-2.144-0.67-3.282-2.947-3.282 -1.439 0-2.578 0.938-2.578 2.444 0 4.221 7.603 3.082 7.603 8.742C128.027 52.157 126.186 53.765 123.038 53.765"/><path class="arch" fill-rule="evenodd" clip-rule="evenodd" d="M121.487 19.746c-33.822-10.8-82.05-10.8-115.805 0C36.39 3.176 90.661 3.176 121.487 19.746"/><path class="arch" fill-rule="evenodd" clip-rule="evenodd" d="M105.419 8.979c-24.436-7.803-59.282-7.803-83.67 0C43.936-2.993 83.147-2.993 105.419 8.979"/></svg></a>
            </h1>
          </div>
          <div class="wrap-header-supp">
            <a class="link-logo-mit" href="http://www.mit.edu" alt="Massaschusetts Institute of Technology logo"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" width="54" height="28" viewBox="0 0 54 28" enable-background="new 0 0 54 28" xml:space="preserve" class="logo-mit"><rect x="28.9" y="8.9" width="5.8" height="19.1" class="color"/><rect width="5.8" height="28"/><rect x="9.6" width="5.8" height="18.8"/><rect x="19.3" width="5.8" height="28"/><rect x="38.5" y="8.9" width="5.8" height="19.1"/><rect x="38.8" width="15.2" height="5.6"/><rect x="28.9" width="5.8" height="5.6"/></svg></a>
          </div>
        </header>
      </div>
    </div>
    <div class="wrap-outer-header-local layout-band <%= 'reasons' if params[:rainbows] %>">
      <div class="wrap-header-local">
        <div class="local-identity">
          <h2 class="title title-site"><a href="/">Public Access QuickSubmit</a></h2>
        </div>
        <div class="wrap-local-nav">
          <div class="wrap-bar">
            <nav class="local-nav">
              <%= link_to "Submit a paper", new_submission_path, class: 'button-secondary' %>
              <% if user_signed_in? %>
                <% if current_user.admin? %>
                  <%= link_to "Submissions", submissions_path, class: 'button-secondary' %>
                <% else %>
                  <%= link_to "My Submissions", submissions_path, class: 'button-secondary' %>
                <% end %>
              <% end %>
            </nav>
            <nav class="nav-user">
              <% if user_signed_in? %>
                <%= link_to("Sign out", destroy_user_session_path, method: :delete, id: "sign_in", class: 'action-auth')  %>
              <% else %>
                <% if ENV['FAKE_AUTH_ENABLED'] == 'true' %>
                  <%= link_to("Sign in", user_developer_omniauth_authorize_path, id: "sign_in", class: 'action-auth') %>
                <% else %>
                  <%= link_to("Sign in", user_mit_oauth2_omniauth_authorize_path, id: "sign_in", class: 'action-auth') %>
                <% end %>
              <% end %>
            </nav>
          </div>
        </div>
      </div>
    </div>
    <div class="wrap-outer-content layout-band">
      <div class="wrap-content layout-3q1q">
        <main id="content-main" class="content-main" role="main">

        <%= bootstrap_flash %>
        <%= yield %>

        </main>
        <!-- close content-main -->

        <aside class="content-sup">
          <% unless user_signed_in? %>
          <div class="bit">
            <h3 class="title">MIT OpenID Sign-in</h3>
            <p>This application uses the MIT OpenId Connect pilot for sign-in (instead of Touchstone) &mdash; it will ask for approval to sign in with your MIT information and credentials. 
            <a target="_blank" href="https://oidc.mit.edu/">Learn more</a>
            </p>
          </div>        
          <% end %>
          <div class="bit">
            <h3 class="title">Related</h3>
            <ul>
              <li><a href="https://dspace.mit.edu/">DSpace@MIT</a></li>
              <li><a href="https://dspace.mit.edu/handle/1721.1/49433/submit">Full OA submission form</a></li>
              <li><a href="https://libraries.mit.edu/scholarly/mit-open-access/open-access-policy/">MIT Faculty OA Policy</a></li>
            </ul>
          </div>

        </aside>
      </div>
    </div>
    <div class="wrap-outer-footer layout-band">
        <div class="wrap-footer footer-slim">
          <footer class="footer-main">
            <div class="identity">
              <div class="wrap-logo-lib">
                <a href="https://libraries.mit.edu" class="logo-mit-lib" alt="MIT Libraries Logo">
                  <span class="sr">MIT Libraries home</span>
                  <svg version="1.1" xmlns="//www.w3.org/2000/svg" x="0px" y="0px" width="128.027" height="53.766" viewBox="0 0 128.027 53.766" enable-background="new 0 0 128.027 53.766" xml:space="preserve"><polygon points="0,53.486 0,29.308 5.919,29.308 8.671,45.75 8.72,45.75 11.643,29.308 17.367,29.308 17.367,53.486 13.787,53.486   13.787,34.833 13.738,34.833 10.352,53.486 6.845,53.486 3.629,34.833 3.581,34.833 3.581,53.486 "/><rect x="20.662" y="29.308" width="3.678" height="24.179"/><polygon points="37.659,29.308 37.659,33.326 33.567,33.326 33.567,53.486 29.889,53.486 29.889,33.326 25.797,33.326   25.797,29.308 "/><polygon points="40.547,53.43 40.547,29.249 42.691,29.249 42.691,51.621 50.695,51.621 50.695,53.43 "/><path d="M52.535 36.517h2.01V53.43h-2.01V36.517zM52.3 29.249h2.478v2.545H52.3V29.249z"/><path d="M57.154 53.431c0.101-0.57 0.201-1.106 0.201-1.676V29.249h2.01v9.176l0.067 0.067c1.037-1.606 2.377-2.311 4.286-2.311 5.493 0 5.058 5.761 5.058 8.774 0 3.719-0.301 8.81-5.225 8.81 -1.976 0-3.416-0.804-4.253-2.378h-0.067v2.043H57.154zM62.948 52.157c3.718 0 3.818-3.182 3.818-7.134s-0.101-7.233-3.818-7.233c-3.249 0-3.65 4.387-3.65 6.933C59.298 47.401 59.298 52.157 62.948 52.157"/><path d="M72.79 38.794h0.066c0.838-1.607 2.613-2.611 4.656-2.611v2.043c-2.847-0.235-4.723 1.474-4.723 4.319v10.886h-2.01V36.517h2.01V38.794z"/><path d="M86.852 51.353h-0.067c-1.072 1.608-2.713 2.412-4.789 2.412 -3.015 0-4.656-2.043-4.656-4.99 0-5.929 5.963-5.325 9.377-5.592v-1.408c0-2.478-0.735-3.985-3.414-3.985 -1.844 0-3.317 0.905-3.317 2.914h-2.144c0.168-3.249 2.68-4.521 5.627-4.521 1.709 0 5.259 0.166 5.259 4.487v8.507c0 1.205 0 2.277 0.2 4.254h-2.075V51.353zM86.716 44.789c-2.879 0.101-7.233-0.233-7.233 3.885 0 1.909 0.972 3.483 3.048 3.483 2.311 0 4.186-2.076 4.186-4.287V44.789z"/><path d="M93.61 38.794h0.067c0.839-1.607 2.613-2.611 4.656-2.611v2.043c-2.847-0.235-4.724 1.474-4.724 4.319v10.886h-2.01V36.517h2.01V38.794z"/><path d="M99.936 36.517h2.009V53.43h-2.009V36.517zM99.7 29.249h2.479v2.545H99.7V29.249z"/><path d="M106.765 45.393v1.306c0 2.344 0.637 5.459 3.818 5.459 2.512 0 3.752-1.607 3.719-3.885h2.109c-0.234 4.086-2.445 5.492-5.828 5.492 -2.914 0-5.827-1.172-5.827-6.296v-4.153c0-4.89 2.043-7.134 5.827-7.134 5.828 0 5.828 4.187 5.828 9.211H106.765zM114.401 43.784c0-3.751-0.603-5.994-3.818-5.994 -3.215 0-3.818 2.243-3.818 5.994H114.401z"/><path d="M123.038 53.765c-3.651 0-5.092-1.774-5.058-5.358h2.043c0 2.312 0.535 3.852 3.114 3.852 1.943 0 2.88-1.104 2.88-2.981 0-4.42-7.603-3.281-7.603-8.875 0-3.114 2.144-4.219 5.092-4.219 3.349 0 4.42 2.311 4.42 4.889h-1.977c-0.1-2.144-0.67-3.282-2.947-3.282 -1.439 0-2.578 0.938-2.578 2.444 0 4.221 7.603 3.082 7.603 8.742C128.027 52.157 126.186 53.765 123.038 53.765"/><path class="arch" fill-rule="evenodd" clip-rule="evenodd" d="M121.487 19.746c-33.822-10.8-82.05-10.8-115.805 0C36.39 3.176 90.661 3.176 121.487 19.746"/><path class="arch" fill-rule="evenodd" clip-rule="evenodd" d="M105.419 8.979c-24.436-7.803-59.282-7.803-83.67 0C43.936-2.993 83.147-2.993 105.419 8.979"/></svg>
                </a>
              </div>
            </div><!-- end div.identity -->
            <div class="wrap-sitemap">
              <nav class="sitemap-libraries-abbrev">
                <h2 class="sr">MIT Libraries navigation</h2>
                <a href="https://libraries.mit.edu/">Home</a>
                <a href="https://libraries.mit.edu/search">Search</a>
                <a href="https://libraries.mit.edu/hours">Hours &amp; locations</a>
                <a href="https://libraries.mit.edu/borrow">Borrow &amp; request</a>
                <a href="https://libraries.mit.edu/research-support">Research support</a>
                <a href="https://libraries.mit.edu/about">About the Libraries</a>
              </nav>
            </div><!-- end div.links-all -->
          </footer>
        </div>
      </div>
      <div class="wrap-outer-footer-institute layout-band">
        <div class="wrap-footer-institute">
          <footer class="footer-info-institute">
            <a class="link-logo-mit" href="http://www.mit.edu" alt="Massachusetts Institute of Technology Logo">
              <svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" width="54" height="28" viewBox="0 0 54 28" enable-background="new 0 0 54 28" xml:space="preserve" class="logo-mit"><rect x="28.9" y="8.9" width="5.8" height="19.1" class="color"/><rect width="5.8" height="28"/><rect x="9.6" width="5.8" height="18.8"/><rect x="19.3" width="5.8" height="28"/><rect x="38.5" y="8.9" width="5.8" height="19.1"/><rect x="38.8" width="15.2" height="5.6"/><rect x="28.9" width="5.8" height="5.6"/></svg>
            </a>
            <div class="about-mit">
              <span class="item">Massachusetts Institute of Technology</span>
              <span class="item">77 Massachusetts Avenue</span>
              <span class="item">Cambridge MA 02139-4307</span>
            </div>
            <div class="license">Licensed under the <a href="http://creativecommons.org/licenses/by-nc/2.0/" class="license-cc">Creative Commons Attribution Non-Commercial License</a> unless otherwise noted. <a href="https://libraries.mit.edu/research-support/notices/copyright-notify/">Notify us about copyright concerns</a>.
            </div><!-- end footer.footer-info-institure -->
          </footer>
        </div>
      </div>


  </div>
  <!-- close wrap-page -->

  </body>
</html>