Sha256: 578b6cc0897c00f6a4a63ba6143013e09ac3b8b3055431bf0fee84cb7f8e5b48

Contents?: true

Size: 612 Bytes

Versions: 4

Compression:

Stored size: 612 Bytes

Contents

module ::Refinery
  module Admin
    class DialogsController < ::Refinery::AdminController
      def show
        @dialog_type = params[:id].downcase

        url_params = params.reject {|key, value| key =~ /(action)|(controller)/}

        @iframe_src = if @dialog_type == 'image'
          refinery.insert_admin_images_path(url_params.merge(:id => nil, :modal => true))
        elsif @dialog_type == 'link'
          refinery.link_to_admin_pages_dialogs_path(url_params.merge(:id => nil))
        end

        render :layout => false
      end

      def from_dialog?
        true
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
refinerycms-core-2.0.3 app/controllers/refinery/admin/dialogs_controller.rb
refinerycms-core-2.0.2 app/controllers/refinery/admin/dialogs_controller.rb
refinerycms-core-2.0.1 app/controllers/refinery/admin/dialogs_controller.rb
refinerycms-core-2.0.0 app/controllers/refinery/admin/dialogs_controller.rb