소스 검색

Widen scope to identify more appeals

Some authorities put appeal status in their standard status field.
main
Adrian Short 5 년 전
부모
커밋
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']


불러오는 중...
취소
저장