controller change, views working and db for paper and journals
This commit is contained in:
1 parent
1fce99c96f
commit
a3a1e4b92e
11 files changed
+248
-123
No files matched your search
@@ -42,17 +42,7 @@ class DesktopController< ApplicationController
|
||||
render "desktop/settings/connections", :layout => false
|
||||
end
|
||||
|
||||
def journal_p
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def journal_p_list
|
||||
render "desktop/journal_pages/list", :layout => false
|
||||
end
|
||||
|
||||
def journal_p_add
|
||||
render "desktop/journal_pages/add", :layout => false
|
||||
end
|
||||
|
||||
#ajax data load....
|
||||
|
||||
def save_desktop_settings
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
class DesktopPublicationsController< ApplicationController
|
||||
def journal_p
|
||||
render "desktop/journal_p", :layout => false
|
||||
end
|
||||
|
||||
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
|
||||
@@ -49,8 +49,12 @@ class OtheraccountsController< ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def twitter
|
||||
|
||||
end
|
||||
|
||||
def getaccounts
|
||||
@accounts = OtherAccount.where(:user_id.all => [current_user.id])
|
||||
@accounts = OtherAccount.where(:user_id.all => [current_user.id]).without(:encrypted_password)
|
||||
render :json => @accounts.to_json
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user