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

pulibrary / orangelight / ba571562-4d8a-409b-ac35-523d2fa30a45

07 Aug 2025 02:49PM UTC coverage: 95.328%. Remained the same
ba571562-4d8a-409b-ac35-523d2fa30a45

Pull #5160

circleci

Ryan Jensen
Fix Hebrew language records display
Pull Request #5160: Fix Hebrew language records display

6101 of 6400 relevant lines covered (95.33%)

1512.02 hits per line

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

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

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

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

14
  def pub_date_field
3✔
15
    blacklight_config.facet_fields['pub_date_start_sort']
198✔
16
  end
17

18
  def pub_date_field_display_facet
3✔
19
    @response.aggregations[pub_date_field]
66✔
20
  end
21

22
  def pub_date_presenter
3✔
23
    view_context.facet_field_presenter(pub_date_field, pub_date_field_display_facet)
66✔
24
  end
25

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

34
  def fields_for_etc(index:, field:)
3✔
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
3✔
47
    @params.except(:clause, :f_inclusive, :op, :sort).merge({ 'advanced_type' => 'advanced' })
66✔
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