Election results in the London Borough of Sutton.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

resultssuttoncouncil.haml 1.2 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .grid_12
  2. %p Sutton Council Election 6 May 2010 Results
  3. %h1= @ward.name + " Ward"
  4. - @page_title = @ward.name + " Ward Results, Sutton Council Election 6 May 2010"
  5. - count = 0
  6. %table
  7. %tr
  8. %th
  9. %th
  10. %th
  11. %th.right Votes
  12. %th.right % Votes
  13. %th
  14. - for candidate in @candidates
  15. - count += 1
  16. %tr.vcard
  17. %td= count
  18. %td{ :style => "background-color: #{candidate.party.colour}" }  
  19. %td
  20. %span.candidate_name.fn
  21. = candidate.forenames.split(' ')[0]
  22. = candidate.surname
  23. %br
  24. %span.candidate_party.org
  25. = candidate.party.name
  26. %td.right= candidate.votes_2010
  27. %td.right
  28. - pc_2010 = candidate.votes_2010.to_f / @total_2010 * 100
  29. = sprintf("%0.1f%%", pc_2010)
  30. -#
  31. %td.right
  32. - unless candidate.percent_2005.nil?
  33. - change_2010 = pc_2010 - candidate.percent_2005
  34. = sprintf("%+0.1f%%", change_2010)
  35. %td
  36. - if count < 4
  37. .elected ELECTED
  38. %p
  39. Total votes:
  40. = @total_2010