File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <%= render Blacklight::Search::SidebarComponent.new(blacklight_config: blacklight_config,
2+ response: response,
3+ view_config: view_config) %>
4+ <% unless helpers.has_search_parameters? || params[:all] %>
5+ <%= link_to 'Show more facets', root_path(all: true), class: 'btn btn-primary' %>
6+ <% end %>
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ class Search ::SidebarComponent < Blacklight ::Component
4+ def initialize ( blacklight_config :, response :, view_config :)
5+ @blacklight_config = blacklight_config
6+ @response = response
7+ @view_config = view_config
8+ end
9+
10+ attr_reader :blacklight_config , :response , :view_config
11+ end
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ class CatalogController < ApplicationController
2626 # When we test with solr 6 we can have:
2727 # config.document_solr_path = 'get'
2828 config . index . document_presenter_class = ArgoIndexPresenter
29+ config . index . sidebar_component = Search ::SidebarComponent
30+
2931 config . show . document_presenter_class = ArgoShowPresenter
3032
3133 config . index . display_type_field = SolrDocument ::FIELD_CONTENT_TYPE
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ require "rails_helper"
4+
5+ RSpec . describe Search ::SidebarComponent , type : :component do
6+ pending "add some examples to (or delete) #{ __FILE__ } "
7+
8+ # it "renders something useful" do
9+ # expect(
10+ # render_inline(described_class.new(attr: "value")) { "Hello, components!" }.css("p").to_html
11+ # ).to include(
12+ # "Hello, components!"
13+ # )
14+ # end
15+ end
You can’t perform that action at this time.
0 commit comments