Election results in the London Borough of Sutton.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

74 lignes
2.2 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. - @election = Election.get(9) # FIXME magic number
  9. %h2
  10. = @district.name
  11. ward candidates for the
  12. %a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}"}
  13. = @election.body.name
  14. election on
  15. = long_date(@election.d)
  16. %table
  17. - Candidacy.all(:election => @election, :district => @district, :order => [:party_id]).each do |c|
  18. - campaign = Campaign.first(:party => c.party, :election => @election)
  19. %tr.vcard
  20. %td{ :style => "background-color: #{c.party.colour}" }  
  21. %td.candidate_name.fn
  22. %a{ :href => "/candidates/#{c.candidate.id}" }
  23. = c.candidate.short_name
  24. %td.org
  25. - if campaign && campaign.party_url
  26. %a{ :href => campaign.party_url }
  27. = party_name(c.labcoop, c.party.name)
  28. - else
  29. = party_name(c.labcoop, c.party.name)
  30. %td
  31. - if campaign && campaign.manifesto_html_url
  32. %a{ :href => campaign.manifesto_html_url }
  33. manifesto
  34. - else
  35.  
  36. -# TODO % turnout plotted over time
  37. -# TODO map of district shown within Sutton boundary
  38. %h2
  39. Candidates elected previously in
  40. = @district.name
  41. = @district.body.district_name
  42. - Election.all(:body => @district.body, :order => [:d.desc]).each do |election|
  43. - ccys = Candidacy.all(:election_id => election.id, :district_id => @district.id, :seats => 1, :order => [:votes.desc])
  44. - unless ccys == []
  45. %h3
  46. %a{ :href => "/bodies/#{@district.body.slug}/elections/#{election.d}/#{election.body.districts_name}/#{@district.slug}"}
  47. = long_date election.d
  48. = election.kind
  49. %table
  50. %tr
  51. %th
  52. %th
  53. %th
  54. %th
  55. - ccys.each do |ccy|
  56. %tr
  57. %td= ccy.position
  58. %td{ :style => "background-color: #{ccy.party.colour}" }  
  59. %td
  60. %a{ :href => "/candidates/#{ccy.candidate.id}" }
  61. = ccy.candidate.short_name
  62. %td= ccy.party.name