Class: Alchemy::Custom::Model::Admin::FilesController

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/alchemy/custom/model/admin/files_controller.rb

Instance Method Summary collapse

Instance Method Details

#elfinderObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/alchemy/custom/model/admin/files_controller.rb', line 7

def elfinder
  authorize! :usage, Alchemy::Custom::Model::ElFinder

  h, r, f = connector.run(params)

  headers.merge!(h)

  if f.blank?
    render (r.empty? ? {:nothing => true} : {:plain => r.to_json}), :layout => false
  else
    send_file f[:path], disposition: :inline
  end


end

#uiObject



23
24
25
26
27
# File 'app/controllers/alchemy/custom/model/admin/files_controller.rb', line 23

def ui
  @volumes = params[:volumes]
  authorize! :ui_usage, Alchemy::Custom::Model::ElFinder
  render layout: false
end