representative_index.haml 983 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
- extends 'base.html'

- load by_group_url

- block content

  - include 'legislature/search.html'

  %p
    Number of representatives: {{ object_count  }}

  %table
    - for representative in object_list
      %tr
        %td
          %a{'href': "{% url 'legislature:representative_detail' name=representative.slug %}"} 
            %img{'src': '={representative.photo}', 'width': '80'}/

        %td
          %a{'href': "{% url 'legislature:representative_detail' name=representative.slug %}"} 
            ={representative.full_name}

        %td
          %a{'href': "{% url 'legislature:representative_index' group_kind='country' group=representative.country.code %}"}
            ={representative.country.name}

        %td
          %a{'href': "{{ representative.current_group_mandate|by_group_url }}"}
            ={representative.current_group_mandate.group.abbreviation}
        %td
          ={representative.score}          

  - include "core/blocks/pagination.html"