• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / orangelight / 62bad3f1-d46d-40af-822c-403d653da2a8

17 Jun 2025 05:30PM UTC coverage: 0.447% (-94.9%) from 95.337%
62bad3f1-d46d-40af-822c-403d653da2a8

push

circleci

maxkadel
Install chrome & chromedriver for smoke specs

43 of 9610 relevant lines covered (0.45%)

0.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/components/orangelight/advanced_search_form_component.rb
1
# frozen_string_literal: true
2

3
class Orangelight::AdvancedSearchFormComponent < Blacklight::AdvancedSearchFormComponent
×
4
  def initialize_search_filter_controls
×
5
    fields = blacklight_config.facet_fields.select { |_k, v| v.include_in_advanced_search }
×
6

7
    fields.each do |_k, config|
×
8
      config.advanced_search_component = Orangelight::FacetFieldCheckboxesComponent
×
9
      display_facet = @response.aggregations[config.field]
×
10
      with_search_filter_control(config:, display_facet:)
×
11
    end
×
12
  end
×
13

14
  def pub_date_field
×
15
    blacklight_config.facet_fields['pub_date_start_sort']
×
16
  end
×
17

18
  def pub_date_field_display_facet
×
19
    @response.aggregations[pub_date_field]
×
20
  end
×
21

22
  def pub_date_presenter
×
23
    view_context.facet_field_presenter(pub_date_field, pub_date_field_display_facet)
×
24
  end
×
25

26
  def initialize_search_field_controls
×
27
    search_fields.values.each.with_index do |field, index|
×
28
      with_search_field_control do
×
29
        generate_fields(index:, field:)
×
30
      end
×
31
    end
×
32
  end
×
33

34
  def fields_for_etc(index:, field:)
×
35
    fields_for('clause[]', index, include_id: false) do |foo|
×
36
      content_tag(:div, class: 'mb-3 advanced-search-field row mb-3') do
×
37
        foo.label(:query, field.display_label('search'), class: "col-sm-3 col-form-label text-md-right") +
×
38
          content_tag(:div, class: 'col-sm-9') do
×
39
            foo.hidden_field(:field, value: field.key) +
×
40
              foo.text_field(:query, value: query_for_search_clause(field.key), class: 'form-control')
×
41
          end
×
42
      end
×
43
    end
×
44
  end
×
45

46
  def hidden_search_state_params
×
47
    @params.except(:clause, :f_inclusive, :op, :sort).merge({ 'advanced_type' => 'advanced' })
×
48
  end
×
49
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc