change journal list json link
This commit is contained in:
parent
d7599f1ccf
commit
703324063e
|
@ -969,7 +969,7 @@ var orbitDesktop = function(dom){
|
||||||
bindSecondaryHandlers();
|
bindSecondaryHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
$.getJSON("/desktop_publications/getjournals",function(journals){
|
$.getJSON("/desktop/journal_pages/get_journals_json",function(journals){
|
||||||
journalData = eval(journals);
|
journalData = eval(journals);
|
||||||
journalview();
|
journalview();
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
|
|
|
@ -3,23 +3,4 @@ class Desktopapp::DesktopAppPublications < Sinatra::Base
|
||||||
get "/desktop/journal_p" do
|
get "/desktop/journal_p" do
|
||||||
erb :journal_p
|
erb :journal_p
|
||||||
end
|
end
|
||||||
|
|
||||||
get "/desktop/journal_p_list" do
|
|
||||||
erb :'journal_pages/list'
|
|
||||||
end
|
|
||||||
|
|
||||||
get '/desktop/journal_p_add' do
|
|
||||||
erb :'journal_pages/add'
|
|
||||||
end
|
|
||||||
|
|
||||||
get '/desktop_publications/getjournals' do
|
|
||||||
@journals = Journal.all
|
|
||||||
data = Array.new
|
|
||||||
@journals.each do |journal|
|
|
||||||
@papers = journal.papers.all
|
|
||||||
data << {"title" => journal.title, "papers" => @papers}
|
|
||||||
end
|
|
||||||
data.to_json
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
Reference in New Issue