Sha256: 68ef7f3479af9034e04b93b72bf96201d4eb69bd8c1533e92d0f192e5a25fd8a

Contents?: true

Size: 1.16 KB

Versions: 20

Compression:

Stored size: 1.16 KB

Contents

module ExportEmailHelper
  include EmailerHelper
  
  def formatted_txt_holding_status(view_data)
    output = ""
    output << view_data[:collection_str] if view_data[:collection_str]
    output << " " + view_data[:call_number] if view_data[:call_number]
    output << " " + view_data[:status] if view_data[:status]
    return output
  end

  def formatted_html_holding_status(view_data)
    output = "".html_safe
    if view_data[:collection_str]
      output << content_tag("span", view_data[:collection_str], :class => "collection") 
    end
    if view_data[:call_number]
      output << " ".html_safe << content_tag("span", view_data[:call_number], :class => "call_no")
    end
    if view_data[:status]
      output << " ".html_safe << content_tag("span", view_data[:status], :class => "status")
    end
    return output
  end

  def validation_error(errors)
    validation_errors = content_tag(:div, :class => "alert alert-danger") do
      content_tag(:span, "Please provide the following:") + content_tag(:ul) do 
        e = "".html_safe
        errors.each do |error|
          e << content_tag(:li, error)
        end
        e
      end
    end
    validation_errors
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
umlaut-4.1.7 app/helpers/export_email_helper.rb
umlaut-4.1.6 app/helpers/export_email_helper.rb
umlaut-4.1.5 app/helpers/export_email_helper.rb
umlaut-4.1.4 app/helpers/export_email_helper.rb
umlaut-4.1.3 app/helpers/export_email_helper.rb
umlaut-4.1.2 app/helpers/export_email_helper.rb
umlaut-4.1.1 app/helpers/export_email_helper.rb
umlaut-4.1.0 app/helpers/export_email_helper.rb
umlaut-4.1.0.pre3 app/helpers/export_email_helper.rb
umlaut-4.1.0.pre.2 app/helpers/export_email_helper.rb
umlaut-4.1.0.pre.alpha.1 app/helpers/export_email_helper.rb
umlaut-4.0.3 app/helpers/export_email_helper.rb
umlaut-4.0.2 app/helpers/export_email_helper.rb
umlaut-4.0.1 app/helpers/export_email_helper.rb
umlaut-4.0.0 app/helpers/export_email_helper.rb
umlaut-4.0.0.beta5 app/helpers/export_email_helper.rb
umlaut-4.0.0.beta4 app/helpers/export_email_helper.rb
umlaut-4.0.0.beta3 app/helpers/export_email_helper.rb
umlaut-4.0.0.beta2 app/helpers/export_email_helper.rb
umlaut-4.0.0.beta1 app/helpers/export_email_helper.rb