Election results in the London Borough of Sutton.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

district.haml 2.1 KiB

13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
13 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. - page_title = "#{district.name} #{district.body.district_name}, #{district.body.name}"
  2. %nav
  3. %a{ :href => "/bodies/#{district.body.slug}" }
  4. « 
  5. = district.body.name
  6. %h1= "#{district.name} #{district.body.district_name}"
  7. -#
  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. %h2 Candidates elected
  37. - Election.all(:body => district.body, :order => [:d.desc]).each do |election|
  38. - ccys = Candidacy.all(:election_id => election.id, :district_id => district.id, :seats => 1, :order => [:votes.desc])
  39. - unless ccys == []
  40. %h3
  41. %a{ :href => "/bodies/#{district.body.slug}/elections/#{election.d}/#{election.body.districts_name}/#{district.slug}"}
  42. = long_date election.d
  43. = election.kind
  44. %table
  45. %tr
  46. %th
  47. %th
  48. %th
  49. %th
  50. - ccys.each do |ccy|
  51. %tr
  52. %td= ccy.position
  53. %td{ :style => "background-color: #{ccy.party.colour}" }  
  54. %td
  55. %a{ :href => "/candidates/#{ccy.candidate.id}" }
  56. = ccy.candidate.short_name
  57. %td= ccy.party.name