fix error
This commit is contained in:
parent
9e891605c5
commit
50ec5bbd62
|
@ -144,12 +144,17 @@ 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.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|
|
jps_data = jps.collect do |jp|
|
||||||
{'title' => jp.create_link_tag_for_title}
|
{'title' => jp.create_link_tag_for_title}
|
||||||
end
|
end
|
||||||
{'name' => name, 'jps' => jps_data}
|
{'name' => name, 'jps' => jps_data}
|
||||||
end
|
end
|
||||||
|
{'year' => year, 'jps_list'=> jps_data}
|
||||||
|
end
|
||||||
{
|
{
|
||||||
'journal_papers' => journal_papers_list,
|
'journal_papers' => journal_papers_list,
|
||||||
'extras' => { 'widget-title' => t('module_name.journal_paper')},
|
'extras' => { 'widget-title' => t('module_name.journal_paper')},
|
||||||
|
|
|
@ -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">
|
||||||
|
<h3 class="year">{{year}}</h3>
|
||||||
|
<div data-level="1" data-list="jps_list">
|
||||||
<h4>{{name}}</h4>
|
<h4>{{name}}</h4>
|
||||||
<ul data-level="1" data-list="jps">
|
<ul data-level="2" data-list="jps">
|
||||||
<li>{{title}}</li>
|
<li>{{title}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{{pagination_goes_here}}
|
{{pagination_goes_here}}
|
Loading…
Reference in New Issue