cirandas.net

ref: master

plugins/orders/lib/help_helper.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
module HelpHelper

  Klass = 'hideable-help'

  def hideable_help_text text
    link = link_to_function '', 'help.toggle(this)',
      'data-show' => t('helpers.help.show'), 'data-hide' => t('helpers.help.hide'),
      :class => "#{Klass}-link"

    content_tag('div', text, :class => Klass) + link
  end

end