Module: ExportEmailHelper
- Includes:
- EmailerHelper
- Defined in:
- app/helpers/export_email_helper.rb
Instance Method Summary collapse
- #formatted_html_holding_status(view_data) ⇒ Object
- #formatted_txt_holding_status(view_data) ⇒ Object
- #validation_error(errors) ⇒ Object
Methods included from EmailerHelper
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 << 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 |
#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 content_tag(:div, :class => "validation_errors") do return 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 end |