Module: OtusHelper

Defined in:
app/helpers/otus_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) otu_autocomplete_selected_tag(otu)



10
11
12
13
14
15
# File 'app/helpers/otus_helper.rb', line 10

def otu_autocomplete_selected_tag(otu)
  return nil if otu.nil? || (otu.new_record? && !otu.changed?)
  [otu.name, 
   Utilities::Strings.nil_wrap('[',taxon_name_autocomplete_selected_tag(otu.taxon_name), ']')
  ].compact.join(' ')
end


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

def otu_link(otu)
  return nil if otu.nil?
  link_to(otu_tag(otu).html_safe, otu)
end

- (Object) otu_tag(otu)



3
4
5
6
7
8
# File 'app/helpers/otus_helper.rb', line 3

def otu_tag(otu)
  return nil if otu.nil?
  [  otu.name,
     Utilities::Strings.nil_wrap('[', full_taxon_name_tag(otu.taxon_name), ']')
  ].compact.join(' ').html_safe
end


26
27
28
# File 'app/helpers/otus_helper.rb', line 26

def otus_link_list_tag(otus)
  otus.collect { |o| link_to(o.name, o) }.join(",")
end

- (Object) otus_search_form



22
23
24
# File 'app/helpers/otus_helper.rb', line 22

def otus_search_form
  render('/otus/quick_search_form')
end