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

pulibrary / orangelight / 00dbc10b-d747-4ad7-b211-7b26d753abbb

14 Aug 2025 01:25PM UTC coverage: 0.483% (-94.9%) from 95.343%
00dbc10b-d747-4ad7-b211-7b26d753abbb

push

circleci

web-flow
Merge pull request #5181 from pulibrary/dependabot/bundler/activestorage-7.2.2.2

Bump activestorage from 7.2.2.1 to 7.2.2.2

47 of 9721 relevant lines covered (0.48%)

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
  # :reek:FeatureEnvy
5
  def initialize_search_filter_controls
×
6
    blacklight_config.facet_fields.each do |_key, config|
×
7
      next unless config.include_in_advanced_search_if&.call || config.include_in_advanced_search
×
8

9
      config.advanced_search_component = Orangelight::FacetFieldCheckboxesComponent
×
10
      display_facet = @response.aggregations[config.field]
×
11
      with_search_filter_control(config:, display_facet:)
×
12
    end
×
13
  end
×
14

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

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

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

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

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

47
  def hidden_search_state_params
×
48
    @params.except(:clause, :f_inclusive, :op, :sort).merge({ 'advanced_type' => 'advanced' })
×
49
  end
×
50
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