Sha256: 83e7f70baa34ac38e1faea580fc60c2f2267625ffb3a74f5058ef0af0be01ac3

Contents?: true

Size: 684 Bytes

Versions: 2

Compression:

Stored size: 684 Bytes

Contents

module ::Refinery
  module Admin
    class DialogsController < ::Refinery::AdminController
      def index
        redirect_to refinery.admin_root_path
      end

      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

2 entries across 2 versions & 1 rubygems

Version Path
refinerycms-core-2.0.5 app/controllers/refinery/admin/dialogs_controller.rb
refinerycms-core-2.0.4 app/controllers/refinery/admin/dialogs_controller.rb