|
@@ -28,13 +28,13 @@ class Site |
|
|
# New applications page |
|
|
# New applications page |
|
|
apps = ScraperWiki.select("* from `applications` |
|
|
apps = ScraperWiki.select("* from `applications` |
|
|
order by date_received desc limit 60") |
|
|
order by date_received desc limit 60") |
|
|
Petrify.page('new-applications', 'new-applications', { apps: apps }) |
|
|
|
|
|
|
|
|
Petrify.page('new-applications', 'new-applications', { apps: apps, title: "New applications" }) |
|
|
|
|
|
|
|
|
# Latest decisions page |
|
|
# Latest decisions page |
|
|
apps = ScraperWiki.select("* from `applications` |
|
|
apps = ScraperWiki.select("* from `applications` |
|
|
order by date_decision desc limit 60") |
|
|
order by date_decision desc limit 60") |
|
|
path = 'decisions' |
|
|
path = 'decisions' |
|
|
Petrify.page(path, 'decisions', { apps: apps }) |
|
|
|
|
|
|
|
|
Petrify.page(path, 'decisions', { apps: apps, title: "Latest decisions" }) |
|
|
Petrify.csv(path, 'inlink-decisions', apps) |
|
|
Petrify.csv(path, 'inlink-decisions', apps) |
|
|
|
|
|
|
|
|
# Appeals page |
|
|
# Appeals page |
|
@@ -58,12 +58,12 @@ class Site |
|
|
") |
|
|
") |
|
|
|
|
|
|
|
|
path = 'appeals' |
|
|
path = 'appeals' |
|
|
Petrify.page(path, 'appeals', { summary: summary, apps: apps }) |
|
|
|
|
|
|
|
|
Petrify.page(path, 'appeals', { summary: summary, apps: apps, title: "Appeals" }) |
|
|
Petrify.csv(path, 'inlink-appeals', apps) |
|
|
Petrify.csv(path, 'inlink-appeals', apps) |
|
|
|
|
|
|
|
|
# Media page |
|
|
# Media page |
|
|
stories = CSV.read('media.csv', :headers => true ) |
|
|
stories = CSV.read('media.csv', :headers => true ) |
|
|
Petrify.page('media', 'media', { stories: stories }) |
|
|
|
|
|
|
|
|
Petrify.page('media', 'media', { stories: stories, title: "Media" }) |
|
|
|
|
|
|
|
|
# Authority pages |
|
|
# Authority pages |
|
|
auths = ScraperWiki.select("distinct(authority_name) as authority_name |
|
|
auths = ScraperWiki.select("distinct(authority_name) as authority_name |
|
@@ -88,7 +88,7 @@ class Site |
|
|
|
|
|
|
|
|
path = ['authorities', slug(auth['authority_name'])] |
|
|
path = ['authorities', slug(auth['authority_name'])] |
|
|
Petrify.page(path, 'authority', \ |
|
|
Petrify.page(path, 'authority', \ |
|
|
{ apps: apps, auth: auth, summary: summary, stories: this_stories }) |
|
|
|
|
|
|
|
|
{ apps: apps, auth: auth, summary: summary, stories: this_stories, title: auth['authority_name'] }) |
|
|
Petrify.csv(path, slug(auth['authority_name']), apps) |
|
|
Petrify.csv(path, slug(auth['authority_name']), apps) |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|