forked from saurabh/personal-journal
fix error
This commit is contained in:
parent
9e891605c5
commit
50ec5bbd62
|
@ -144,11 +144,16 @@ class PersonalJournalsController < ApplicationController
|
|||
|
||||
def index_by_author(journal_papers)
|
||||
journal_papers_total_pages = journal_papers.total_pages
|
||||
journal_papers_list = journal_papers.group_by{|jp| jp.member_profiles.collect{|v| v.name}.join(', ') rescue jp.authors}.collect do |name, jps|
|
||||
jps_data = jps.collect do |jp|
|
||||
{'title' => jp.create_link_tag_for_title}
|
||||
journal_papers_list = journal_papers.group_by{|jp| jp.year}.collect do |year, jps|
|
||||
jps_data = jps.group_by do |jp|
|
||||
jp.member_profiles.collect{|v| v.name}.join(', ') rescue jp.authors
|
||||
end.collect do |name, jps|
|
||||
jps_data = jps.collect do |jp|
|
||||
{'title' => jp.create_link_tag_for_title}
|
||||
end
|
||||
{'name' => name, 'jps' => jps_data}
|
||||
end
|
||||
{'name' => name, 'jps' => jps_data}
|
||||
{'year' => year, 'jps_list'=> jps_data}
|
||||
end
|
||||
{
|
||||
'journal_papers' => journal_papers_list,
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
<h3 class="page-module-title">{{page-title}}</h3>
|
||||
<article>
|
||||
<div data-level="0" data-list="journal_papers">
|
||||
<h4>{{name}}</h4>
|
||||
<ul data-level="1" data-list="jps">
|
||||
<li>{{title}}</li>
|
||||
</ul>
|
||||
<h3 class="year">{{year}}</h3>
|
||||
<div data-level="1" data-list="jps_list">
|
||||
<h4>{{name}}</h4>
|
||||
<ul data-level="2" data-list="jps">
|
||||
<li>{{title}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{{pagination_goes_here}}
|
Loading…
Reference in New Issue