orbit-basic/app/controllers/desktop_controller.rb

32 lines
611 B
Ruby
Raw Normal View History

2012-03-28 10:53:30 +00:00
class DesktopController< ApplicationController
layout 'desktop'
2012-04-03 10:25:41 +00:00
before_filter :authenticate_user!
2012-03-28 10:53:30 +00:00
def index
2012-04-05 12:32:56 +00:00
@desktop = current_user.desktop
2012-03-28 10:53:30 +00:00
end
2012-03-29 07:23:48 +00:00
def desktop
2012-04-05 12:32:56 +00:00
2012-03-29 07:23:48 +00:00
render :layout => false
2012-03-29 11:50:23 +00:00
end
def app_manager
render :layout => false
end
def sections
render :layout => false
end
2012-04-03 10:25:41 +00:00
2012-04-05 12:32:56 +00:00
def save_desktop_settings
Desktop.update_attributes(:theme => params["theme"])
a = Array.new
a << {"success"=>"true"}
render :json=>a.to_json
2012-04-03 10:25:41 +00:00
end
2012-04-05 12:32:56 +00:00
def get_desktop_settings
@desktop = Desktop.find(params["id"])
render :json => @desktop.to_json
2012-04-03 10:25:41 +00:00
end
2012-03-28 10:53:30 +00:00
end