app/helpers/type_materials/catalog_helper.rb
# Return text only, no HTML. 
# To be used in paper catalogs, this is to be human readable.
#   If we need italics or bold use Markdown, and we will compile after that
Return text only, no HTML.
To be used in paper catalogs, this is to be human readable.
If we need italics or bold use Markdown, and we will compile after that
Return text only no HTML . To be used in paper catalogs this is to be human readable . If we need italics or bold use Markdown and we will compile after that
def type_material_catalog_label(type_material) 
    t = type_material
    return '[TODO: Add type material]' if t.nil? 
    co = t.collection_object
    ce = co.collecting_event
    v = []
    v.push t.type_type.capitalize + (co.total > 1 ? " (n= #{co.total})" : '')
    v.push co.biocuration_classes.collect{|a| a.name.downcase}.join(', ').presence
    v.push label_for_identifier(co.identifiers.first)
    if d = label_for_repository(co.repository)
      v.push "deposited at: #{d}" 
    else
      v.push "[TODO: Repository NOT PROVIDED]"
    end
    v.push type_material_collecting_event_label(type_material.collection_object.collecting_event)
    v.compact.join('; ')
  end
def type_material_catalog_label ( type_material ) t = type_material return '[TODO: Add type material]' if t . nil? co = t . collection_object ce = co . collecting_event v = [ ] v . push t . type_type . capitalize + ( co . total > 1 ? " (n= #{co.total})" : '' ) v . push co . biocuration_classes . collect { | a | a . name . downcase } . join ( ', ' ) . presence v . push label_for_identifier ( co . identifiers . first ) if d = label_for_repository ( co . repository ) v . push "deposited at: #{d}" else v . push "[TODO: Repository NOT PROVIDED]" end v . push type_material_collecting_event_label ( type_material . collection_object . collecting_event ) v . compact . join ( '; ' ) end
Return text only, no HTML.
Return text only no HTML .
# Possibly parameterize biocurations: true, repository: true, identifiers: true # Anticipate rendering in paper # Holotype male, adult, INHS 12312, deposited: <repoo name>. <verbatim_label>.
type_material
<not_specific>