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.
 
 
 
 
 

28 lines
633 B

  1. def short_date(s)
  2. return if s.nil?
  3. Date.parse(s).strftime("%e %b %Y")
  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|grant|permitted)/i)
  11. s = "<span class=refuse>#{s}</span>" if s.match(/refus/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
  20. def normalise_decision(d)
  21. # https://schemas.opendata.esd.org.uk/PlanningApplications/LocalOpenDataIncentiveSchemePlanningApplicationsSchemaGuidance.pdf
  22. end