Election results in the London Borough of Sutton.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 regels
607 B

  1. %h1= "Candidates"
  2. %nav.letter_index
  3. - ("A".."Z").each do |letter|
  4. %a{ :href => "##{letter}" }<
  5. = letter
  6. - first_letter = ''
  7. %table
  8. - candidates.each do |c|
  9. - if c.surname[0] != first_letter
  10. - first_letter = c.surname[0]
  11. %tr.noborder
  12. %td &nbsp;
  13. %td
  14. %tr.noborder{ :name => first_letter, :id => first_letter }
  15. %td.strong{ :style => "font-size: 300%;" }= first_letter.upcase
  16. %td
  17. %tr
  18. %td
  19. %td
  20. %tr
  21. %td
  22. %a{ :href => "/candidates/#{c.id}" }
  23. = c.surname
  24. %td= c.forenames