Election results in the London Borough of Sutton.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

resultsdistrict.haml 2.2 KiB

hace 13 años
hace 12 años
hace 13 años
hace 12 años
hace 13 años
hace 12 años
hace 13 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. - @page_title = "#{@district.name} #{@district.body.district_name} results, #{@body.name} election #{short_date(@election.d)}"
  2. %p
  3. %a{ :href => "/bodies/#{@district.body.slug}/elections/#{@election.d}" }<
  4. = @body.name
  5. election
  6. &nbsp;
  7. = long_date(@election.d)
  8. .nav
  9. - if @districts_in_this_election.size > 1
  10. - @district_index = @districts_in_this_election.index(@district)
  11. - unless @district_index == 0 # Don't show the previous link if this is the first district for this election
  12. - @previous_district = @districts_in_this_election[@district_index - 1]
  13. %a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}/#{@election.body.districts_name}/#{@previous_district.slug}" }<
  14. &laquo;&nbsp;
  15. = @previous_district.name
  16. &nbsp;&nbsp;&nbsp;
  17. - unless @district_index == @districts_in_this_election.size - 1 # Don't show the next link if this is the last district for this election
  18. - @next_district = @districts_in_this_election[@district_index + 1]
  19. %a{ :href => "/bodies/#{@election.body.slug}/elections/#{@election.d}/#{@election.body.districts_name}/#{@next_district.slug}" }<
  20. = @next_district.name
  21. &raquo;
  22. %p
  23. %a{ :href => "/bodies/#{@district.body.slug}/#{@district.body.district_name.pluralize(2)}/#{@district.slug}" }
  24. All elections in
  25. = @district.name
  26. &raquo;
  27. %h1= @district.name + " " + @district.body.district_name
  28. - count = 0
  29. %table
  30. %tr.header
  31. %th
  32. %th
  33. %th
  34. %th.right votes
  35. %th.right % votes
  36. %th
  37. - for candidacy in @candidacies
  38. - count += 1
  39. %tr.vcard
  40. %td= count
  41. %td{ :style => "background-color: #{candidacy.party.colour}" } &nbsp;
  42. %td
  43. %span.candidate_name.fn
  44. %a{ :href => "/candidates/#{candidacy.candidate.id}" }
  45. = candidacy.candidate.short_name
  46. %br
  47. %span.candidate_party.org
  48. = candidacy.party.name
  49. %td.right= commify(candidacy.votes)
  50. %td.right= format_percent(candidacy.votes.to_f / @total_votes * 100)
  51. %td
  52. - if candidacy.seats == 1
  53. .elected ELECTED
  54. %tr.footer
  55. %td
  56. %td
  57. %td
  58. %td= commify(@total_votes)
  59. %td
  60. %td
  61. %td