2014-06-04 03:55:13 +00:00
|
|
|
module Admin::JournalPapersHelper
|
2014-07-03 14:39:01 +00:00
|
|
|
def page_for_journal_paper(journal_paper_object)
|
2014-06-25 06:20:22 +00:00
|
|
|
journal_paper_page = nil
|
2014-07-03 14:39:01 +00:00
|
|
|
pages = Page.where(:module=>"journal_paper")
|
2014-06-25 06:20:22 +00:00
|
|
|
|
|
|
|
journal_paper_page = pages.first if journal_paper_page.nil?
|
2014-07-03 14:39:01 +00:00
|
|
|
request.protocol+(request.host_with_port+journal_paper_page.url+'/'+journal_paper_object.to_param).gsub('//','/') rescue "/"
|
2014-06-25 06:20:22 +00:00
|
|
|
end
|
2014-06-04 03:55:13 +00:00
|
|
|
end
|