Update journal_papers_controller.rb
This commit is contained in:
parent
0f1f7c7b90
commit
0a179503d6
|
@ -31,20 +31,6 @@ class Admin::JournalPapersController < OrbitMemberController
|
||||||
@journals.delete key
|
@journals.delete key
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#journals = JournalPaper.order_by(:year=>'desc').map{|value| value}
|
|
||||||
#journals_name1 = journals.map{|value| value[:paper_title]}
|
|
||||||
#journals_name2 = journals.map{|value| value[:journal_title]}
|
|
||||||
#compare1 = journals_name1.map{|v1| journals_name1.select{|v2| v2==v1}.count>1}
|
|
||||||
#compare2 = journals_name2.map{|v1| journals_name2.select{|v2| v2==v1}.count>1}
|
|
||||||
#compare = compare1 and compare2
|
|
||||||
#@journal = Hash.new
|
|
||||||
#compare.each_with_index do |b,i|
|
|
||||||
# if b && !(@journal.keys.include? [journals_name1[i],journals_name2[i]])
|
|
||||||
# @journal[[journals_name1[i],journals_name2[i]]] = [journals[i]]
|
|
||||||
# elsif b
|
|
||||||
# @journal[[journals_name1[i],journals_name2[i]]] << journals[i]
|
|
||||||
# end
|
|
||||||
#end
|
|
||||||
if params['mode']!='simple'
|
if params['mode']!='simple'
|
||||||
@journals.each do |key,value|
|
@journals.each do |key,value|
|
||||||
@journals[key] = value.group_by{|v| [get_level_type(v),get_author_type(v),get_paper_type(v),get_publication_date(v)]}
|
@journals[key] = value.group_by{|v| [get_level_type(v),get_author_type(v),get_paper_type(v),get_publication_date(v)]}
|
||||||
|
|
Loading…
Reference in New Issue