Election results in the London Borough of Sutton.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

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