Election results in the London Borough of Sutton.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

76 řádky
2.2 KiB

  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