Election results in the London Borough of Sutton.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

district.haml 1.1 KiB

hace 13 años
hace 13 años
12345678910111213141516171819202122232425262728293031323334353637383940
  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