Election results in the London Borough of Sutton.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

resultsdistrict.haml 2.1 KiB

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