瀏覽代碼

Show candidates for forthcoming council election (election ID is hard coded)

tags/last-sinatra-version
Adrian Short 10 年之前
父節點
當前提交
819a5369bc
共有 1 個文件被更改,包括 26 次插入1 次删除
  1. +26
    -1
      views/district.haml

+ 26
- 1
views/district.haml 查看文件

@@ -8,10 +8,35 @@

%h1= "#{@district.name} #{@district.body.district_name}"

-# Candidates for 22 May 2014 council election

- @election = Election.get(8)

%h2
= @district.name
ward candidates for the
%a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}"}
= @election.body.name
election on
= long_date(@election.d)

%table
- Candidacy.all(:election => @election, :district => @district).each do |c|
%tr.vcard
%td{ :style => "background-color: #{c.party.colour}" }  
%td.candidate_name.fn
%a{ :href => "/candidates/#{c.candidate.id}" }
= c.candidate.short_name
%td.org
= party_name(c.labcoop, c.party.name)

-# TODO % turnout plotted over time
-# TODO map of district shown within Sutton boundary

%h2 Candidates elected
%h2
Candidates elected previously in
= @district.name
= @district.body.district_name

- Election.all(:body => @district.body, :order => [:d.desc]).each do |election|
- ccys = Candidacy.all(:election_id => election.id, :district_id => @district.id, :seats => 1, :order => [:votes.desc])


Loading…
取消
儲存