representative_list.haml 1.07 KB
Newer Older
1 2
- extends 'base.html'

Arnaud Fabre's avatar
Arnaud Fabre committed
3
- load representatives_extras
4 5 6 7

- block content

  - include 'legislature/search.html'
Arnaud Fabre's avatar
Arnaud Fabre committed
8
  - include "core/blocks/pagination.html"
Arnaud Fabre's avatar
Arnaud Fabre committed
9

Arnaud Fabre's avatar
Arnaud Fabre committed
10 11 12 13 14 15 16 17 18 19 20 21
  %table.table
    %tr
      %th
        Photo
      %th
        Name
      %th
        Country
      %th
        Group
      %th
        Score
22 23 24
    - for representative in object_list
      %tr
        %td
Arnaud Fabre's avatar
Arnaud Fabre committed
25
          %a{'href': "{% url 'legislature:representative-detail' name=representative.slug %}"}
26 27 28
            %img{'src': '={representative.photo}', 'width': '80'}/

        %td
Arnaud Fabre's avatar
Arnaud Fabre committed
29
          %a{'href': "{% url 'legislature:representative-detail' name=representative.slug %}"}
Arnaud Fabre's avatar
Arnaud Fabre committed
30
            = representative.full_name
31 32

        %td
Arnaud Fabre's avatar
Arnaud Fabre committed
33
          %a{'href': "{% url 'legislature:representative-index' group_kind='country' group=representative.country.code %}"}
Arnaud Fabre's avatar
Arnaud Fabre committed
34
            = representative.country|country_flag
35 36

        %td
Arnaud Fabre's avatar
Arnaud Fabre committed
37
          %a{'href': "{{ representative.main_mandate|by_group_url }}"}
Arnaud Fabre's avatar
Arnaud Fabre committed
38
            = representative.main_mandate.group.abbreviation
39
        %td
Arnaud Fabre's avatar
Arnaud Fabre committed
40
          = representative.score|score_label
41 42

  - include "core/blocks/pagination.html"