Sha256: 3331d09f9246c1f1a7b717172fd93cf00cb1e42aa249548f82047dea4766deff

Contents?: true

Size: 435 Bytes

Versions: 11

Compression:

Stored size: 435 Bytes

Contents

# -*- encoding: utf-8 -*-
module CiniiBooksHelper
  def link_to_import_from_cinii(ncid)
    if ncid.blank?
      t('enju_nii.not_available')
    else
      manifestation = Manifestation.where(:ncid => ncid).first
      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

11 entries across 11 versions & 1 rubygems

Version Path
enju_nii-0.1.0.pre11 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre10 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre9 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre8 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre7 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre6 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre5 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre4 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre3 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre2 app/helpers/cinii_books_helper.rb
enju_nii-0.1.0.pre app/helpers/cinii_books_helper.rb