UNC-Libraries/hy-c

View on GitHub
app/views/catalog/index.html.erb

Summary

Maintainability
Test Coverage
<%# [hyc-override] https://github.com/samvera/hyrax/blob/hyrax-v4.0.0/app/views/catalog/index.html.erb %>
<%# [hyc-override] Add a header to the top of search results pages to describe what page is being displayed %>
<% content_for(:container_header) do -%>
  <% if params.dig('f', 'human_readable_type_sim')&.at(0) == 'Collection' %> 
    <h1 class="collections-browse">Browse Collections</h1>
  <% elsif params[:q].nil? %>
    <h1 class="collections-browse">Showing all Results</h1>
  <% else %>
    <h1 class="collections-browse">Showing Results for: "<%= params[:q] %>"</h1>
  <% end %>
<% end %>

<div class="row mt-4">
  <div id="content" class="order-sm-1 order-md-2 col-md-9 col-sm-12">
    <%= render 'search_results' %>
  </div>

  <div id="sidebar" class="order-sm-2 order-md-1 col-md-3 col-sm-12">
    <%= render 'search_sidebar' %>
  </div>
</div>