Module: ContentsHelper

Defined in:
app/helpers/contents_helper.rb

Instance Method Summary collapse

Instance Method Details



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

def content_link(content)
  return nil if content.nil?
  link_to((content), content)
end

#contents_search_formObject



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

def contents_search_form
  render('/contents/quick_search_form')
end

#taxon_works_content_tag(content) ⇒ Object

Note disambiguation from Rails’ content_tag()



4
5
6
7
8
9
10
11
# File 'app/helpers/contents_helper.rb', line 4

def (content)
  return nil if content.nil?
  (:span, title: MARKDOWN_HTML.render(content.text).html_safe  ) do
    [ controlled_vocabulary_term_tag(content.topic.metamorphosize),
      otu_tag(content.otu)
    ].join(' - ').html_safe
  end
end