Sha256: f98e39e03d5167ecbb00e9dae04ab371c4fe12d07f6b795892a7f6eea3da6ba0
Contents?: true
Size: 594 Bytes
Versions: 5
Compression:
Stored size: 594 Bytes
Contents
# -*- encoding: utf-8 -*- module NdlBooksHelper def link_to_import_from_ndl(jpno) if jpno.blank? t('enju_ndl.not_available') else identifier_type = IdentifierType.where(:name => 'jpno').first if identifier_type manifestation = Identifier.where(:body => jpno, :identifier_type_id => identifier_type.id).first.try(:manifestation) end unless manifestation link_to t('enju_ndl.add'), ndl_books_path(:book => {:jpno => jpno}), :method => :post else link_to t('enju_ndl.already_exists'), manifestation end end end end
Version data entries
5 entries across 5 versions & 1 rubygems