Election results in the London Borough of Sutton.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

candidate.haml 1.2 KiB

13 年之前
13 年之前
13 年之前
13 年之前
13 年之前
13 年之前
13 年之前
13 年之前
123456789101112131415161718192021222324252627282930313233343536373839
  1. .nav
  2. %a{ :href => "/candidates" }
  3. « All candidates
  4. %h1= @page_title = @candidate.name
  5. %h2 Elections contested
  6. %table
  7. %tr
  8. %th  
  9. %th date
  10. %th party
  11. %th body
  12. %th district
  13. %th votes
  14. %th position
  15. %th  
  16. - @candidacies.each do |ccy|
  17. %tr
  18. %td{ :style => "background-color: #{ccy['party_colour']}" }  
  19. %td
  20. %a{ :href => "/bodies/#{ccy['body_slug']}/elections/#{ccy['d']}" }
  21. -# Postgres returns ccy['d'] as a Date and sqlite returns it as a String
  22. = long_date(ccy['d'].to_time)
  23. %td= ccy['party_name']
  24. %td
  25. %a{ :href => "/bodies/#{ccy['body_slug']}" }
  26. = ccy['body_name']
  27. %td
  28. %a{ :href => "/bodies/#{ccy['body_slug']}/elections/#{ccy['d']}/#{ccy['districts_name']}/#{ccy['district_slug']}" }
  29. = ccy['district_name']
  30. %td.right= commify(ccy['votes'])
  31. %td.right= to_ordinal(ccy['position'])
  32. %td= ccy['seats'] == 1 ? "Elected" : "Not elected"
  33. .warning
  34. This might not be the complete electoral history for this candidate. They might have stood in elections outside Sutton and / or in Sutton elections for which we don't have data.