Sha256: dfed510540dda734f58f52f3a998f8ccb841fb11fc0edea6124b3cf7341995ba

Contents?: true

Size: 519 Bytes

Versions: 2

Compression:

Stored size: 519 Bytes

Contents

format :html do
  view :help, tags: :unknown_ok, cache: :never do
    help_text = voo.help || rule_based_help
    return "" unless help_text.present?

    wrap_with :div, help_text, class: classy("help-text")
  end

  def rule_based_help
    return "" unless (rule_card = card.help_rule_card)

    with_nest_mode :normal do
      process_content rule_card.content, chunk_list: :references
      # render help card with current card's format
      # so current card's context is used in help card nests
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
card-1.97.0.1 mod/standard/set/all/rich_html/html_views/help.rb
card-1.97.0 mod/standard/set/all/rich_html/html_views/help.rb