瀏覽代碼

Widen scope to identify more appeals

Some authorities put appeal status in their standard status field.
main
Adrian Short 6 年之前
父節點
當前提交
3d2b58dcc5
共有 2 個檔案被更改,包括 14 行新增6 行删除
  1. +10
    -6
      lib/site.rb
  2. +4
    -0
      views/appeals.haml

+ 10
- 6
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'


+ 4
- 0
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']


Loading…
取消
儲存