Module: QuickSearchHelper
- Defined in:
- app/helpers/quick_search_helper.rb
Overview
View helper: quick search.
Instance Method Summary collapse
-
#quick_search_icon_for(result_class, size: '2x', family: 'fas', **options) ⇒ ActiveSupport::SafeBuffer
Icon for a quick search result class, for the navbar type picker.
Instance Method Details
#quick_search_icon_for(result_class, size: '2x', family: 'fas', **options) ⇒ ActiveSupport::SafeBuffer
Icon for a quick search result class, for the navbar type picker.
Shares Crm::QuickSearchResultCardComponent's map rather than keeping a
second one: the copy that lived here had drifted, and purchase_order,
voucher and credit_memo were falling through to the question mark.
16 17 18 19 20 21 |
# File 'app/helpers/quick_search_helper.rb', line 16 def quick_search_icon_for(result_class, size: '2x', family: 'fas', **) icon_name = Crm::QuickSearchResultCardComponent::RESULT_CLASS_ICONS .fetch(result_class.to_s.to_sym, 'question-square') fa_icon(icon_name, family: family, class: [[:class], "fa-#{size}"].compact.join(' ')) end |