Sha256: 54fdf9b1f1d87e9948d3b982b95fa276a2be9c2d5960715c734b2023a6e26636
Contents?: true
Size: 600 Bytes
Versions: 2
Compression:
Stored size: 600 Bytes
Contents
# -*- encoding: utf-8 -*- module CiniiBooksHelper def link_to_import_from_cinii(ncid) if ncid.blank? t('enju_nii.not_available') else identifier_type = IdentifierType.where(:name => 'ncid').first if identifier_type manifestation = Identifier.where(:body => ncid, :identifier_type_id => identifier_type.id).first.try(:manifestation) end unless manifestation link_to t('enju_nii.add'), cinii_books_path(:book => {:ncid => ncid}), :method => :post else link_to t('enju_nii.already_exists'), manifestation end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enju_nii-0.1.0.pre13 | app/helpers/cinii_books_helper.rb |
enju_nii-0.1.0.pre12 | app/helpers/cinii_books_helper.rb |