diff --git a/lib/site.rb b/lib/site.rb index 9a2cb16..524d7ef 100644 --- a/lib/site.rb +++ b/lib/site.rb @@ -35,17 +35,21 @@ class Site # Appeals page summary = ScraperWiki.select(" - authority_name, appeal_status, appeal_decision, count(*) as applications + authority_name, status, decision, appeal_status, appeal_decision, count(*) as applications from applications - where appeal_status is not null - and appeal_status != 'Unknown' - group by authority_name, appeal_status, appeal_decision + where (appeal_status is not null + and appeal_status != 'Unknown') + or status like '%appeal%' + group by authority_name, appeal_status, appeal_decision + collate nocase ") apps = ScraperWiki.select(" * from applications - where appeal_status is not null - and appeal_status != 'Unknown' + where (appeal_status is not null + and appeal_status != 'Unknown') + or status like '%appeal%' + collate nocase ") path = 'appeals' diff --git a/views/appeals.haml b/views/appeals.haml index 81ef502..b5a4c3f 100644 --- a/views/appeals.haml +++ b/views/appeals.haml @@ -21,6 +21,8 @@ %thead %tr %th Authority + %th Status + %th Decision %th Appeal status %th Appeal decision %th Applications @@ -30,6 +32,8 @@ %td.nowrap %a{ href: authority_url(row['authority_name']) } = row['authority_name'] + %td= cleanup(row['status']) + %td= cleanup(row['decision']) %td= cleanup(row['appeal_status']) %td= cleanup(row['appeal_decision']) %td.right= row['applications']