Sha256: b3ebe295c9d3a9f407073cfd0b797253cd1f67ec04e7e4fc0630dd9b4a9a004f
Contents?: true
Size: 633 Bytes
Versions: 8
Compression:
Stored size: 633 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 button_to t('enju_nii.add'), cinii_books_path(book: {ncid: ncid}), method: :post, data: {disable_with: t('page.saving')} else link_to t('enju_nii.already_exists'), manifestation end end end end
Version data entries
8 entries across 8 versions & 1 rubygems