education/classroom

View on GitHub
app/views/shared/_invitation_header.html.erb

Summary

Maintainability
Test Coverage
<header class="site-header">
  <div class="container-lg d-md-flex flex-items-center flex-justify-between p-responsive py-3">
    <%= link_to(image_tag('logo@2x.png', class: 'site-logo', alt: 'GitHub for Classrooms'), (logged_in? ? organizations_path : root_path), class: 'd-block text-center mb-2 mb-md-0') %>

    <nav class="site-nav d-sm-flex flex-wrap flex-content-start flex-justify-center">
      <%= link_to "GitHub Education", 'https://education.github.com', target: '_blank', class: 'd-block text-center mx-sm-3 mb-2 mb-sm-0' %>

      <ul class="list-style-none d-flex flex-justify-center">
        <li class="mx-3">
          <%= link_to 'https://education.github.com/forum', class: 'tooltipped tooltipped-s', 'aria-label' => t('views.shared.community_discussion') do %>
            <%= octicon 'comment-discussion' %>
          <% end %>
        </li>

        <li class="mx-3">
          <%= link_to 'https://github.com/education/classroom/issues', class: 'tooltipped tooltipped-s', 'aria-label' => t('views.shared.report_bug') do %>
            <%= octicon 'bug' %>
          <% end %>
        </li>

        <li class="mx-3">
          <%= link_to 'https://github.com/education/classroom/pulls?q=is%3Apr+is%3Amerged+sort%3Aupdated-desc', target: '_blank', class: 'tooltipped tooltipped-s', 'aria-label' => t('views.shared.changelog') do %>
            <%= octicon 'git-pull-request' %>
          <% end %>
        </li>

        <li class="mx-3">
          <%= link_to help_path, class: 'tooltipped tooltipped-s', 'aria-label' => t('views.shared.help') do %>
            <%= octicon 'question' %>
          <% end %>
        </li>

        <li class="mx-3">
          <%= link_to current_user.github_user.html_url, class: 'tooltipped tooltipped-s', 'aria-label' => t('views.shared.view_gh_profile') do %>
            <%= image_tag current_user.github_user.github_avatar_url(40), class: 'avatar', alt: "@#{current_user.github_user.login}", height: 20, width: 20 %>
          <% end %>
        </li>

        <li class="ml-3">
          <%= link_to logout_path, method: :post, class: 'tooltipped tooltipped-s', 'aria-label' => t('views.shared.sign_out') do %>
            <%= octicon 'sign-out' %>
          <% end %>
        </li>
      </ul>
    </nav>
  </div>
</header>