|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- - @page_title = "#{@district.name} #{@district.body.district_name}, #{@district.body.name}"
-
- .nav
- %p
- %a{ :href => "/bodies/#{@district.body.slug}" }
- «
- = @district.body.name
-
- %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 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])
-
- - unless ccys == []
- %h3
- %a{ :href => "/bodies/#{@district.body.slug}/elections/#{election.d}/#{election.body.districts_name}/#{@district.slug}"}
- = long_date election.d
- = election.kind
-
- %table
- %tr
- %th
- %th
- %th
- %th
-
- - ccys.each do |ccy|
- %tr
- %td= ccy.position
- %td{ :style => "background-color: #{ccy.party.colour}" }
- %td
- %a{ :href => "/candidates/#{ccy.candidate.id}" }
- = ccy.candidate.short_name
- %td= ccy.party.name
-
|