Update journal_papers_helper.rb
This commit is contained in:
parent
d9ef7c5585
commit
9bdc47e315
|
@ -1,4 +1,19 @@
|
||||||
module Admin::JournalPapersHelper
|
module Admin::JournalPapersHelper
|
||||||
|
def get_member(journal)
|
||||||
|
Array(MemberProfile.find(journal.member_profile_id))
|
||||||
|
end
|
||||||
|
def get_level_type(journal)
|
||||||
|
!journal.journal_levels.blank? ? "(#{journal.journal_levels.collect(&:title).join(', ')})" : nil
|
||||||
|
end
|
||||||
|
def get_author_type(journal)
|
||||||
|
journal.journal_paper_author_types.collect(&:title).join(', ') rescue ''
|
||||||
|
end
|
||||||
|
def get_paper_type(journal)
|
||||||
|
journal.journal_paper_type.title rescue ''
|
||||||
|
end
|
||||||
|
def get_publication_date(journal)
|
||||||
|
journal.publication_date.strftime('%Y/%m/%d') rescue ''
|
||||||
|
end
|
||||||
def page_for_journal_paper(journal_paper_object)
|
def page_for_journal_paper(journal_paper_object)
|
||||||
journal_paper_page = nil
|
journal_paper_page = nil
|
||||||
pages = Page.where(:module=>"journal_paper")
|
pages = Page.where(:module=>"journal_paper")
|
||||||
|
|
Loading…
Reference in New Issue