representative_list.haml 1.57 KB
Newer Older
Jamesie Pic's avatar
Jamesie Pic committed
1
2
3
- extends 'base.html'

- load i18n
4
- load memopol_tags
Jamesie Pic's avatar
Jamesie Pic committed
5
6
- load representatives_recommendations_tags

7
- block head
Jamesie Pic's avatar
Jamesie Pic committed
8

9
  {{ filter.form.media }}
Jamesie Pic's avatar
Jamesie Pic committed
10

11
- block content
12

13
  - block search
Jamesie Pic's avatar
Jamesie Pic committed
14

15
16
    {% url 'representative-list' as action_url %}
    - include 'representatives/_filter_form.html' with action=action_url form=filter.form qs=request.GET.urlencode
Jamesie Pic's avatar
Jamesie Pic committed
17

Jamesie Pic's avatar
Jamesie Pic committed
18
19
20
21
22
23
24
25
26
27
  - include 'core/blocks/pagination.html'

  - block list

    %table.table
      %tr
        %th
          - trans 'Photo'
        %th
          - trans 'Name'
28
29
        %th
          - trans 'Chamber'
Jamesie Pic's avatar
Jamesie Pic committed
30
31
32
33
34
35
36
37
        %th
          - trans 'Country'
        %th
          - trans 'Group'
        %th
          - trans 'Score'

      - for representative in object_list
38
39
        %tr.representative_item{'class': '{{ representative.active|yesno:"active,inactive" }}'}
          %td.photo
40
            %a{'href': "{% url 'representative-detail' representative.slug %}"}
Jamesie Pic's avatar
Jamesie Pic committed
41
42
43
              %img{'src': '={representative.photo}', 'width': '80'}/

          %td
44
            %a{'href': "{% url 'representative-detail' representative.slug %}"}
Jamesie Pic's avatar
Jamesie Pic committed
45
46
              = representative.full_name

47
          %td
48
            %a{'href': "{% chamber_url representative.chamber %}"}
49
              = representative.chamber
50

Jamesie Pic's avatar
Jamesie Pic committed
51
          %td
52
            %a{'href': "{% country_url representative.country %}"}
Jamesie Pic's avatar
Jamesie Pic committed
53
54
55
              = representative.country

          %td
56
            %a{'href': "{% group_url representative.main_mandate.group %}"}
Nicolas Joyard's avatar
Nicolas Joyard committed
57
              = representative.main_mandate.group|group_icon
Jamesie Pic's avatar
Jamesie Pic committed
58
          %td
Jamesie Pic's avatar
Jamesie Pic committed
59
            = representative.score.score|score_label
Jamesie Pic's avatar
Jamesie Pic committed
60
61

  - include 'core/blocks/pagination.html'