representative_detail.haml 1.86 KB
Newer Older
Arnaud Fabre's avatar
Arnaud Fabre committed
1
2
3
4
5
6
7
8
9
10
11
-# List representatives
  
- extends 'base.html'
- load by_group_url

- block content
  %p{:style => "float: left"}
    %img{:src => "{{ representative.photo }}"}/
    
  %h1= representative.full_name

Arnaud Fabre's avatar
Arnaud Fabre committed
12
  %h2
13
    SCORE : {{ representative.score }}
Arnaud Fabre's avatar
Arnaud Fabre committed
14
15
16
17
18
19
20
21
22
23
24
25
26
  %p
    %strong
      %a{:href => "{{ representative.current_group_mandate|by_group_url }}"}
        {{ representative.current_group_mandate.role }} of
        {{ representative.current_group_mandate.group.name }}

  %p
    Born in {{ representative.birth_place }} the
    {{ representative.birth_date }} ({{ representative.get_gender_display }})

  %p= representative.country.name

  -# Mandates
27
28
29
30
31
32
33
34
35
36
37
  %div{:style => "clear: both"}

  %h2 Votes

  %ul
    - for vote in representative.votes.all
      %li
        ={vote.proposal.recommendation.title} -
        ={vote.position}
        (recommendation: ={vote.proposal.recommendation.recommendation})
      
Arnaud Fabre's avatar
Arnaud Fabre committed
38
  
39
  %h2 Mandates
Arnaud Fabre's avatar
Arnaud Fabre committed
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  
  - for mandate in representative.active_mandates
    .mandate
      %h3
        {{ mandate.group.name }}
        %small= mandate.role
      %p
        {{ mandate.begin_date }} to {{ mandate.end_date }} <br>
        %a{:href => "{{ mandate|by_group_url }}"}
          %strong {{ mandate.group.kind }} :
          %em {{ mandate.group.name }} ({{ mandate.group.abbreviation }}) <br>
          Constituency : {{ mandate.constituency.name }} <br>
  %hr/

  -# Former mandates
    
  %h2{:style => "clear: both"} Former mandates
  
  - for mandate in representative.former_mandates
    .mandate
      %h3
        {{ mandate.group.name }}
        %small= mandate.role
      %p
        {{ mandate.begin_date }} to {{ mandate.end_date }} <br>
        %a{:href => "{{ mandate|by_group_url }}"}
          %strong {{ mandate.group.kind }} :
          %em {{ mandate.group.name }} ({{ mandate.group.abbreviation }}) <br>
          Constituency : {{ mandate.constituency.name }} <br>
  %hr/