Sha256: 73d141a23a020fcb9430457763b1de09566ab2795f285e136e2f5f35b4f4c7af

Contents?: true

Size: 597 Bytes

Versions: 6

Compression:

Stored size: 597 Bytes

Contents

class Admin::DialogsController < Admin::BaseController

  layout 'admin_dialog'

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

    if @dialog_type
      @submit_button_text = "Insert"
      @cancel_button_text = "Cancel"

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

      @iframe_src = if @dialog_type == 'image'
        insert_admin_images_url(:dialog => true)
      elsif @dialog_type == 'link'
        link_to_admin_pages_dialogs_url(url_params)
      end

      render :layout => false

    else
      render :nothing => true
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
refinerycms-0.9.6.25 vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb
refinerycms-0.9.6.24 vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb
refinerycms-0.9.6.23 vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb
refinerycms-0.9.6.22 vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb
refinerycms-0.9.6.21 vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb
refinerycms-0.9.6.19 vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb