Module: Lib::Vendor::ColrapiHelper
- Defined in:
- app/helpers/lib/vendor/colrapi_helper.rb
Instance Method Summary collapse
- #colrapi_filter_link(collection_object, name_status) ⇒ Object
- #colrapi_usage_status_tag(name_status) ⇒ Object
Instance Method Details
#colrapi_filter_link(collection_object, name_status) ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/helpers/lib/vendor/colrapi_helper.rb', line 14 def colrapi_filter_link(collection_object, name_status) if name_status[:provisional_status] if collection_object.current_taxon_name link_to('Filter', filter_collection_objects_task_url(taxon_name_id: collection_object.current_taxon_name.id), target: :_blank, rel: :noopener) end end end |
#colrapi_usage_status_tag(name_status) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/lib/vendor/colrapi_helper.rb', line 3 def colrapi_usage_status_tag(name_status) case name_status[:provisional_status] when :accepted tag.span('accepted', class: [:feedback, 'feedback-info', 'feedback-thin']) when :undeterminable tag.span('undeterminable', class: [:feedback, 'feedback-warning', 'feedback-thin']) when :synonym tag.span('synonym', class: [:feedback, 'feedback-danger', 'feedback-thin']) end end |