Parcourir la source

Make applications and decisions pages longer; sort authority apps most recent first [skip ci]

main
Adrian Short il y a 6 ans
Parent
révision
2f343aeeba
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. +3
    -3
      lib/site.rb

+ 3
- 3
lib/site.rb Voir le fichier

@@ -15,11 +15,11 @@ class Site
Petrify.csv(path, 'inlink-summary', summary)

# New applications page
apps = ScraperWiki.select("* from `applications` order by date_received desc limit 30")
apps = ScraperWiki.select("* from `applications` order by date_received desc limit 60")
Petrify.page('new-applications', 'new-applications', { apps: apps })

# Latest decisions page
apps = ScraperWiki.select("* from `applications` order by date_decision desc limit 30")
apps = ScraperWiki.select("* from `applications` order by date_decision desc limit 60")
path = 'decisions'
Petrify.page(path, 'decisions', { apps: apps })
Petrify.csv(path, 'inlink-decisions', apps)
@@ -54,7 +54,7 @@ class Site
group by status, decision, appeal_status, appeal_decision
", auth['authority_name'])

apps = ScraperWiki.select("* from applications where authority_name = ? order by date_received", auth['authority_name'])
apps = ScraperWiki.select("* from applications where authority_name = ? order by date_received desc", auth['authority_name'])

path = ['authorities', slug(auth['authority_name'])]
Petrify.page(path, 'authority', { apps: apps, auth: auth, summary: summary })


Chargement…
Annuler
Enregistrer