Election results in the London Borough of Sutton.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 lines
1.1 KiB

  1. - @page_title = "#{@district.name} #{@district.body.district_name}, #{@district.body.name}"
  2. .nav
  3. %p
  4. %a{ :href => "/bodies/#{@district.body.slug}" }
  5. « 
  6. = @district.body.name
  7. %h1= "#{@district.name} #{@district.body.district_name}"
  8. -# TODO % turnout plotted over time
  9. -# TODO map of district shown within Sutton boundary
  10. %h2 Candidates elected
  11. - Election.all(:body => @district.body, :order => [:d.desc]).each do |election|
  12. - ccys = Candidacy.all(:election_id => election.id, :district_id => @district.id, :seats => 1, :order => [:votes.desc])
  13. - unless ccys == []
  14. %h3
  15. %a{ :href => "/bodies/#{@district.body.slug}/elections/#{election.d}/#{election.body.districts_name}/#{@district.slug}"}
  16. = long_date election.d
  17. = election.kind
  18. %table
  19. %tr
  20. %th
  21. %th
  22. %th
  23. %th
  24. - ccys.each do |ccy|
  25. %tr
  26. %td= ccy.position
  27. %td{ :style => "background-color: #{ccy.party.colour}" }  
  28. %td
  29. %a{ :href => "/candidates/#{ccy.candidate.id}" }
  30. = ccy.candidate.short_name
  31. %td= ccy.party.name