representative_grid.haml 1.09 KB
Newer Older
Jamesie Pic's avatar
Jamesie Pic committed
1
2
- extends 'representatives/representative_list.html'

3
- load memopol_tags
Jamesie Pic's avatar
Jamesie Pic committed
4
5
6
7
8
9
- load representatives_recommendations_tags

- block list

  .representative_grid
    - for representative in object_list
10
      .representative_item{'class': '{{ representative.active|yesno:"active,inactive" }}'}
Jamesie Pic's avatar
Jamesie Pic committed
11
        %p.photo
12
          %a{'href': "{% url 'representative-detail' representative.slug %}"}
Jamesie Pic's avatar
Jamesie Pic committed
13
14
15
            %img{'src': '={representative.photo}', 'width': '80'}/
        %ul
          %li.name
16
            %a{'href': "{% url 'representative-detail' representative.slug %}"}
Jamesie Pic's avatar
Jamesie Pic committed
17
              = representative.full_name
18
          %li.chamber
19
            %a{'href': "{% chamber_url representative.chamber %}"}
20
              = representative.chamber|chamber_icon
Jamesie Pic's avatar
Jamesie Pic committed
21
          %li.country
22
            %a{'href': "{% country_url representative.country %}"}
Jamesie Pic's avatar
Jamesie Pic committed
23
24
              = representative.country|country_flag
          %li.mandate
25
            %a{'href': "{% group_url representative.main_mandate.group %}"}
Nicolas Joyard's avatar
Nicolas Joyard committed
26
              = representative.main_mandate.group|group_icon
Jamesie Pic's avatar
Jamesie Pic committed
27
28
          %li.score
            = representative.score.score|score_label