Module: TypeMaterialsHelper

Defined in:
app/helpers/type_materials_helper.rb

Instance Method Summary collapse

Instance Method Details

#options_for_type_type_selectObject



17
18
19
# File 'app/helpers/type_materials_helper.rb', line 17

def options_for_type_type_select
  options_for_select((TypeMaterial::ICZN_TYPES.keys + TypeMaterial::ICN_TYPES.keys).uniq.sort, selected: 'holotype')
end


8
9
10
11
# File 'app/helpers/type_materials_helper.rb', line 8

def type_material_link(type_material)
  return nil if type_material.nil?
  link_to(type_material_tag(type_material).html_safe, type_material)
end

#type_material_tag(type_material) ⇒ Object



3
4
5
6
# File 'app/helpers/type_materials_helper.rb', line 3

def type_material_tag(type_material)
  return nil if type_material.nil?
  [type_material.type_type, 'of', object_tag(type_material.protonym)].compact.join(' ')
end

#type_materials_search_formObject



13
14
15
# File 'app/helpers/type_materials_helper.rb', line 13

def type_materials_search_form
  render('/type_materials/quick_search_form')
end