Module: TypeMaterialsHelper

Defined in:
app/helpers/type_materials_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) options_for_type_type_select



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

- (Object) type_material_tag(type_material)



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

- (Object) type_materials_search_form



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

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