This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2012-05-03 13:30:12 +00:00
|
|
|
class DesktopPublicationsController< ApplicationController
|
2012-05-04 12:28:12 +00:00
|
|
|
def journal_p
|
|
|
|
render "desktop/journal_p", :layout => false
|
|
|
|
end
|
2012-05-03 13:30:12 +00:00
|
|
|
|
|
|
|
def journal_p_list
|
|
|
|
render "desktop/journal_pages/list", :layout => false
|
|
|
|
end
|
|
|
|
|
|
|
|
def journal_p_add
|
|
|
|
render "desktop/journal_pages/add", :layout => false
|
|
|
|
end
|
|
|
|
|
|
|
|
def create_journal
|
|
|
|
Journal.create(user_id: current_user.id, title: "2012, Material Chemistry and Physics Journal")
|
|
|
|
b = Array.new
|
|
|
|
b << {"success"=>"true"}
|
|
|
|
render :json=>b.to_json
|
|
|
|
end
|
|
|
|
|
|
|
|
def getjournals
|
|
|
|
@journals = Journal.all
|
|
|
|
data = Array.new
|
|
|
|
@journals.each do |journal|
|
|
|
|
@papers = journal.papers.all
|
|
|
|
data << {"title" => journal.title, "papers" => @papers}
|
|
|
|
end
|
|
|
|
render :json=>data.to_json
|
|
|
|
end
|
|
|
|
end
|