Sha256: 4e0ef5aa9b58311fa7388873652d08c05322868a7aeb3e436530b82fce436c02

Contents?: true

Size: 533 Bytes

Versions: 10

Compression:

Stored size: 533 Bytes

Contents

module Admin
  class DialogsController < Admin::BaseController

    def show
      @dialog_type = params[:id].downcase

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

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

      render :layout => false
    end

    def from_dialog?
      true
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
refinerycms-core-1.0.11 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.10 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.9 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.8 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.7 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.5 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.4 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.3 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.1 app/controllers/admin/dialogs_controller.rb
refinerycms-core-1.0.0 app/controllers/admin/dialogs_controller.rb