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)
|
def index_by_author(journal_papers)
|
||||||
journal_papers_total_pages = journal_papers.total_pages
|
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|
|
journal_papers_list = journal_papers.group_by{|jp| jp.year}.collect do |year, jps|
|
||||||
jps_data = jps.collect do |jp|
|
jps_data = jps.group_by do |jp|
|
||||||
{'title' => jp.create_link_tag_for_title}
|
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
|
end
|
||||||
{'name' => name, 'jps' => jps_data}
|
{'year' => year, 'jps_list'=> jps_data}
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
'journal_papers' => journal_papers_list,
|
'journal_papers' => journal_papers_list,
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
<h3 class="page-module-title">{{page-title}}</h3>
|
<h3 class="page-module-title">{{page-title}}</h3>
|
||||||
<article>
|
<article>
|
||||||
<div data-level="0" data-list="journal_papers">
|
<div data-level="0" data-list="journal_papers">
|
||||||
<h4>{{name}}</h4>
|
<h3 class="year">{{year}}</h3>
|
||||||
<ul data-level="1" data-list="jps">
|
<div data-level="1" data-list="jps_list">
|
||||||
<li>{{title}}</li>
|
<h4>{{name}}</h4>
|
||||||
</ul>
|
<ul data-level="2" data-list="jps">
|
||||||
|
<li>{{title}}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{{pagination_goes_here}}
|
{{pagination_goes_here}}
|
Loading…
Reference in New Issue