app/models/hierarchy_entry.rb
# takes the result of the above and adds italics tags around it if the
# taxon is of a rank which should be italicized
takes the result of the above and adds italics tags around it if the
taxon is of a rank which should be italicized
takes the result of the above and adds italics tags around it if the taxon is of a rank which should be italicized
def title_canonical_italicized
    return @title_canonical_italicized unless @title_canonical_italicized.nil?
    @title_canonical_italicized = title_canonical
    if name.is_surrogate_or_hybrid? || name.is_subgenus?
    elsif name.ranked_canonical_form && !name.ranked_canonical_form.string.blank?
      @title_canonical_italicized = "<i>#{@title_canonical_italicized}</i>" if
        (species_or_below? || @title_canonical_italicized.match(/ /))
    elsif name.canonical_form && !name.canonical_form.string.blank?
      @title_canonical_italicized = "<i>#{@title_canonical_italicized}</i>" if
        (species_or_below? || @title_canonical_italicized.match(/ /))
    else
    end
    @title_canonical_italicized
  end
def title_canonical_italicized return @title_canonical_italicized unless @title_canonical_italicized . nil? @title_canonical_italicized = title_canonical if name . is_surrogate_or_hybrid? || name . is_subgenus? elsif name . ranked_canonical_form && ! name . ranked_canonical_form . string . blank? @title_canonical_italicized = "<i>#{@title_canonical_italicized}</i>" if ( species_or_below? || @title_canonical_italicized . match ( / / ) ) elsif name . canonical_form && ! name . canonical_form . string . blank? @title_canonical_italicized = "<i>#{@title_canonical_italicized}</i>" if ( species_or_below? || @title_canonical_italicized . match ( / / ) ) else end @title_canonical_italicized end
takes the result of the above and adds italics tags around it if the
taxon is of a rank which should be italicized
takes the result of the above and adds italics tags around it if the taxon is of a rank which should be italicized
# used the ranked version first # do nothing # do nothing