views/_taxon_autocomplete.haml
- modifier_class = 'autocomplete-item--with-image' if taxon.thumbnail
%span.autocomplete-item{ data: { path: taxon_path(taxon) }, class: modifier_class }
- unless taxon.classification_summary.empty?
%span.autocomplete-item__classification
= taxon.classification_summary.map{ |t| t.name }.join(" > ")
%span.autocomplete-item__taxon
= taxon.name
- if taxon.english_vernacular_name
%span.autocomplete-item__vernacular
= taxon.english_vernacular_name
- unless taxon.name_matches?(matched_name)
%span.autocomplete-item__alternate
Alternative name:
= matched_name
- if taxon.thumbnail
%img.autocomplete-item__thumbnail{ src: taxon.thumbnail, alt: '' }