Sha256: 2f7cdfb58bcb2caa358e9f49e3cca9d66d627b13d54c46e6d901d60ab5c56704

Contents?: true

Size: 455 Bytes

Versions: 76

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module WidgetUrlsHelper
    def embed_modal_for(url)
      js_embed_code = String.new(content_tag(:script, "", src: url))
      embed_code = String.new(content_tag(:noscript, content_tag(:iframe, "", src: url.gsub(".js", ".html"), frameborder: 0, scrolling: "vertical")))
      render partial: "decidim/shared/embed_modal", locals: { js_embed_code: js_embed_code, embed_code: embed_code }
    end
  end
end

Version data entries

76 entries across 76 versions & 2 rubygems

Version Path
decidim-core-0.21.0 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.20.1 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.20.0 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.19.1 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.18.1 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.19.0 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.17.2 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.18.0 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.17.1 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.16.1 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.17.0 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.16.0 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.15.2 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.15.1 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.15.0 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.14.4 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.14.3 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.14.2 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.14.1 app/helpers/decidim/widget_urls_helper.rb
decidim-core-0.13.1 app/helpers/decidim/widget_urls_helper.rb