|
|
@@ -52,6 +52,10 @@ class Site |
|
|
|
Petrify.page(path, 'appeals', { summary: summary, apps: apps }) |
|
|
|
Petrify.csv(path, 'inlink-appeals', apps) |
|
|
|
|
|
|
|
# Media page |
|
|
|
media_items = CSV.read('media.csv', :headers => true ) |
|
|
|
Petrify.page('media', 'media', { media_items: media_items }) |
|
|
|
|
|
|
|
# Authority pages |
|
|
|
auths = ScraperWiki.select("distinct(authority_name) as authority_name from applications") |
|
|
|
|
|
|
@@ -65,13 +69,11 @@ class Site |
|
|
|
|
|
|
|
apps = ScraperWiki.select("* from applications where authority_name = ? order by date_received desc", auth['authority_name']) |
|
|
|
|
|
|
|
stories = media_items.select { |s| s[4].match(auth['authority_name'])} |
|
|
|
|
|
|
|
path = ['authorities', slug(auth['authority_name'])] |
|
|
|
Petrify.page(path, 'authority', { apps: apps, auth: auth, summary: summary }) |
|
|
|
Petrify.page(path, 'authority', { apps: apps, auth: auth, summary: summary, stories: stories }) |
|
|
|
Petrify.csv(path, slug(auth['authority_name']), apps) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
# Media page |
|
|
|
media_items = CSV.read('media.csv', :headers => true ) |
|
|
|
Petrify.page('media', 'media', { media_items: media_items }) |
|
|
|
end |