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.

district.haml 2.0 KiB

pirms 8 gadiem
pirms 8 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
pirms 13 gadiem
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. %nav
  2. %a{ :href => "/bodies/#{district.body.slug}" }
  3. « 
  4. = district.body.name
  5. %h1= "#{district.name} #{district.body.district_name}"
  6. -#
  7. - election = Election.get(9) # FIXME magic number
  8. %h2
  9. = district.name
  10. ward candidates for the
  11. %a{ :href => "/bodies/#{election.body.slug}/elections/#{election.d}"}
  12. = election.body.name
  13. election on
  14. = long_date(election.d)
  15. %table
  16. - Candidacy.all(:election => election, :district => district, :order => [:party_id]).each do |c|
  17. - campaign = Campaign.first(:party => c.party, :election => election)
  18. %tr.vcard
  19. %td{ :style => "background-color: #{c.party.colour}" }  
  20. %td.candidate_name.fn
  21. %a{ :href => "/candidates/#{c.candidate.id}" }
  22. = c.candidate.short_name
  23. %td.org
  24. - if campaign && campaign.party_url
  25. %a{ :href => campaign.party_url }
  26. = party_name(c.labcoop, c.party.name)
  27. - else
  28. = party_name(c.labcoop, c.party.name)
  29. %td
  30. - if campaign && campaign.manifesto_html_url
  31. %a{ :href => campaign.manifesto_html_url }
  32. manifesto
  33. - else
  34.  
  35. %h2 Candidates elected
  36. - Election.all(:body => district.body, :order => [:d.desc]).each do |election|
  37. - ccys = Candidacy.all(:election_id => election.id, :district_id => district.id, :seats => 1, :order => [:votes.desc])
  38. - unless ccys == []
  39. %h3
  40. %a{ :href => "/bodies/#{district.body.slug}/elections/#{election.d}/#{election.body.districts_name}/#{district.slug}"}
  41. = long_date election.d
  42. = election.kind
  43. %table
  44. %tr
  45. %th
  46. %th
  47. %th
  48. %th
  49. - ccys.each do |ccy|
  50. %tr
  51. %td= ccy.position
  52. %td{ :style => "background-color: #{ccy.party.colour}" }  
  53. %td
  54. %a{ :href => "/candidates/#{ccy.candidate.id}" }
  55. = ccy.candidate.short_name
  56. %td= ccy.party.name