learningtapestry/lcms-engine

View on GitHub
app/views/lcms/engine/documents/_header.html.erb

Summary

Maintainability
Test Coverage
<div class="o-page__module">
  <div class="o-page__wrap--row">
    <div class="c-ld-header__map">
      <% unless request[:action].index('export') %>
        <%= react_component('CurriculumMap', props.merge(mapType: 'o-ld-map')) %>
        <% unless request[:action].index('lti') %>
          <div class="u-margin-top--gutter">
            <%= link_to back_to_resource_path(document.resource), class: 'u-txt--button c-ld-header__curriculum-back' do %>
              <i class="ub-angle-left u-text--middled u-text--bolded"></i> <%= t('resources.btn.back') %>
            <% end %>
          </div>
        <% end %>
      <% end %>
    </div>
    <div class="c-ld-header__content">
      <div class="u-txt--ld-header-breadcrumb <%= 'u-text--capitalized' unless document.ela? && document.prereq? %>">
        <%= document.full_breadcrumb %>
      </div>
      <h1 class="u-txt--ld-header-title"><%= document.title unless document.foundational? %></h1>
      <div class="u-txt--ld-header-teaser o-social-sharing__teaser">
        <%= raw(document.teaser) %>
      </div>
      <div class="u-padding-top--large">
        <% if document.standards.present? && !document.foundational? %>
          <p class="u-txt--ld-header-standards u-text--uppercase"><strong>Standards: </strong><%= document.standards %></p>
        <% end %>
        <% if document.math_practice.present? %>
          <p class="u-txt--ld-header-standards u-text--uppercase"><strong>Mathematical Practice Standards: </strong><%= document.math_practice %></p>
        <% end %>
      </div>
    </div>
    <div class="c-ld-header__links">
      <div>
        <%= link_to t('ui.download'), '#resources', class: "o-ub-ld-btn o-ub-ld-btn--#{document.subject} u-text--uppercase", data: { no_turbolink: true } %>
      </div>
    </div>
  </div>
</div>