Module: SerialsHelper

Defined in:
app/helpers/serials_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) serial_autocomplete_tag(serial, term = '')



8
9
10
11
12
13
14
# File 'app/helpers/serials_helper.rb', line 8

def serial_autocomplete_tag(serial, term = '')
  return nil if serial.nil?
  show_this =  serial.name.gsub(/#{term}/, "<mark>#{term}</mark>") # weee bit simpler
  # show_this += " (#{geographic_area.geographic_area_type.name})" unless geographic_area.geographic_area_type.nil?
  # show_this += " [#{geographic_area.parent.name}]" unless geographic_area.parent.nil?
  show_this.html_safe
end

- (Object) serial_for_select(serial)



25
26
27
# File 'app/helpers/serials_helper.rb', line 25

def serial_for_select(serial)
  serial.name if serial
end


16
17
18
19
# File 'app/helpers/serials_helper.rb', line 16

def serial_link(serial)
  return nil if serial.nil?
  link_to(serial_tag(serial).html_safe, serial)
end

- (Object) serial_tag(serial)



3
4
5
6
# File 'app/helpers/serials_helper.rb', line 3

def serial_tag(serial)
  return nil if serial.nil?
  serial.name
end

- (Object) serials_search_form



21
22
23
# File 'app/helpers/serials_helper.rb', line 21

def serials_search_form
  render('/serials/quick_search_form')
end