5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'vendor/plugins/refinery_dialogs/app/controllers/admin/dialogs_controller.rb', line 5
def show
@dialog_type = params[:id].try(:downcase)
if @dialog_type
@submit_button_text = "Insert"
url_params = params.reject {|key, value| key =~ /(action)|(controller)/}
if @dialog_type == 'image'
@iframe_src = insert_admin_images_url(:dialog => true)
elsif @dialog_type == 'link'
@iframe_src = link_to_admin_pages_dialogs_url(url_params)
end
render :layout => false
else
render :nothing => true
end
end
|