Sha256: 8f84604cc160d93840c6c4a8979071c60ac4cd8eb0c62e2c90709b7d12a4dfa7

Contents?: true

Size: 912 Bytes

Versions: 13

Compression:

Stored size: 912 Bytes

Contents

module ReleaseProcessHelper
  
  def display_release_status_notice(document)
    readiness = document.test_release_readiness
    if readiness == true
      flash[:notice] ||= []
      if document.submitted_for_release?
        flash[:notice] << "This item has been released for library circulation."
      else
        flash[:notice] << "This item is ready to be released for library circulation."
      end
    else
      flash[:error] ||= []
      flash[:error] = flash[:error] | readiness[:failures]
    end
  end

  def check_embargo_date_format
    if params.keys.include? [:embargo, :embargo_release_date]
      em_date = params[[:embargo, :embargo_release_date]]["0"]
      unless em_date.blank?
        begin 
          !Date.parse(em_date)
        rescue
          params[[:embargo,:embargo_release_date]]["0"] = ""
          raise "Unacceptable date format"
        end
      end
    end
  end  
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hydra-head-3.1.0.pre5 app/helpers/release_process_helper.rb
hydra-head-3.1.0.pre4 app/helpers/release_process_helper.rb
hydra-head-3.1.0.pre3 app/helpers/release_process_helper.rb
hydra-head-3.0.1 app/helpers/release_process_helper.rb
hydra-head-3.1.0.pre2 app/helpers/release_process_helper.rb
hydra-head-3.0.0 app/helpers/release_process_helper.rb
hydra-head-3.1.0.pre1 app/helpers/release_process_helper.rb
hydra-head-3.0.0.rc2 app/helpers/release_process_helper.rb
hydra-head-3.0.0.rc1 app/helpers/release_process_helper.rb
hydra-head-3.0.0pre4 app/helpers/release_process_helper.rb
hydra-head-3.0.0pre3 app/helpers/release_process_helper.rb
hydra-head-3.0.0pre2 app/helpers/release_process_helper.rb
hydra-head-3.0.0pre1 app/helpers/release_process_helper.rb