diff --git a/app/helpers/admin/journal_papers_helper.rb b/app/helpers/admin/journal_papers_helper.rb index a5abbbb..c053400 100644 --- a/app/helpers/admin/journal_papers_helper.rb +++ b/app/helpers/admin/journal_papers_helper.rb @@ -1,4 +1,19 @@ 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) journal_paper_page = nil pages = Page.where(:module=>"journal_paper")