Sha256: 199728a1f14f4c58dc421aed66c101d18d8753424d67e1855d05a4b280ed733d

Contents?: true

Size: 1.01 KB

Versions: 35

Compression:

Stored size: 1.01 KB

Contents

module Renalware
  module SnippetsHelper
    # Adds to the page:
    # - the snippets modal dialog container (which will be ajax-populated)
    # - the link to invoke the snippets dialog (loading content via ajax)
    # Note that the data-target on the modal container determines which textarea is
    # populated with when a snippet is selected.
    def snippets_modal_and_link_to_open_it(target_input_for_seleted_snippet:)
      capture do
        concat content_tag(:div,
                           nil,
                           id: "snippets-modal",
                           class: "reveal-modal",
                           data: {
                             reveal: "data-reveal",
                             target: target_input_for_seleted_snippet
                           })
        concat link_to t("snippets.insert"),
                        snippets_path(format: :js),
                        class: "button alternative right insert-snippet-button",
                        remote: true
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.15 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.14 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.13 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.12 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.11 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.9 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.8 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.7 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.5 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.4 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.3 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.2 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.1 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.0 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.0.pre.rc13 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.0.pre.rc11 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.0.pre.rc10 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.0.pre.rc9 app/helpers/renalware/snippets_helper.rb
renalware-core-2.0.0.pre.rc8 app/helpers/renalware/snippets_helper.rb