Module: ExportEmailHelper

Includes:
EmailerHelper
Defined in:
app/helpers/export_email_helper.rb

Instance Method Summary collapse

Methods included from EmailerHelper

#brief_citation

Instance Method Details

#formatted_html_holding_status(view_data) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/export_email_helper.rb', line 12

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

#formatted_txt_holding_status(view_data) ⇒ Object



4
5
6
7
8
9
10
# File 'app/helpers/export_email_helper.rb', line 4

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

#validation_error(errors) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
# File 'app/helpers/export_email_helper.rb', line 26

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