• 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/dropdown_help_text_component.rb
1
# frozen_string_literal: true
2

3
class Orangelight::DropdownHelpTextComponent < Blacklight::System::DropdownComponent
×
4
  # options are { label:, value:, helptext: } hashes
5
  def option_text_and_value(option)
×
6
    [option[:label], option[:value]]
×
7
  end
×
8

9
  # Override to allow adding and styling a helptext for each option
10
  def before_render
×
11
    with_button(classes: 'btn btn-outline-secondary dropdown-toggle', label: button_label) unless button
×
12

13
    return if options.any?
×
14

15
    with_options(@choices.map do |option|
×
16
      value = option[:value]
×
17
      { text: label_text(option), url: helpers.url_for(@search_state.params_for_search(@param => value)), selected: @selected == value }
×
18
    end)
×
19
  end
×
20

21
  def label_text(option)
×
22
    content_tag(:div) do
×
23
      safe_join(
×
24
        [
×
25
          content_tag(:div, option[:label]),
×
26
          content_tag(:div, option[:helptext], id: option[:value], class: "dropdown-help-text")
×
27
        ]
×
28
      )
×
29
    end
×
30
  end
×
31
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