Planning applications tracker for InLinkUK from BT kiosks. https://kiosks.adrianshort.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 lines
478 B

  1. def short_date(s)
  2. return if s.nil?
  3. Date.parse(s).strftime("%e %b %Y").gsub(' ', ' ')
  4. end
  5. def cleanup(s)
  6. return if s.nil?
  7. s.sub!('Unknown', '')
  8. s.sub!('Not Available', '')
  9. s.sub!('Not Applicable', '')
  10. # s = "<span class=grant>#{s}</span>" if s.match(/approve/i)
  11. # s = "<span class=refuse>#{s}</span>" if s.match(/refuse/i)
  12. s
  13. end
  14. def slug(s)
  15. s.downcase.gsub(' ', '-')
  16. end
  17. def authority_url(authority_name)
  18. "/authorities/#{slug(authority_name)}/"
  19. end