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