Election results in the London Borough of Sutton.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

candidate.haml 1.6 KiB

pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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= party_name(ccy['labcoop'], 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. - if ccy['votes'].nil? # election results not yet available
  31. %td.right —
  32. %td.right —
  33. %td.right —
  34. - else
  35. %td.right= commify(ccy['votes'])
  36. %td.right= to_ordinal(ccy['position'])
  37. %td= ccy['seats'] == 1 ? "Elected" : "Not elected"
  38. .warning
  39. %p
  40. 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.
  41. %p
  42. Some candidates have more than one profile page due to them using slightly different names in different elections. See the full
  43. %a{ :href => "/candidates/##{@candidate.surname[0]}" }<
  44. candidates list
  45. for details.