indentlabs/notebook

View on GitHub
app/views/thredded/shared/_nav.html.erb

Summary

Maintainability
Test Coverage
<%= yield :thredded_breadcrumbs %>

<nav class="thredded--navigation">
  <ul class="thredded--user-navigation<%= ' thredded--user-navigation-standalone' if Thredded.standalone_layout? %>">
    <%= render 'thredded/shared/nav/moderation' %>
    <%= render 'thredded/shared/nav/notification_preferences', messageboard: messageboard_or_nil %>
    <%= render 'thredded/shared/nav/private_topics' if Thredded.private_messaging_enabled %>
    <% if Thredded.standalone_layout? %>
      <%= render 'thredded/shared/nav/standalone_profile' if thredded_signed_in? %>
      <%= render 'thredded/shared/nav/standalone' %>
    <% end %>
  </ul>
  <% if content_for? :thredded_main_navigation %>
    <%= yield :thredded_main_navigation %>
  <% else %>
    <div class="thredded--main-navigation">
      <%# Navigation scoped to the current messageboard if any. %>
      <%# yield :thredded_breadcrumbs %>
      <%= render 'thredded/search/form', messageboard: messageboard_or_nil %>
      <div class="thredded--spacer"></div>
      <ul class="thredded--scoped-navigation">
        <%= render 'thredded/shared/nav/unread_topics', messageboard: messageboard_or_nil %>
      </ul>
    </div>
  <% end %>
</nav>