representative_detail.haml 2.05 KB
Newer Older
Arnaud Fabre's avatar
Arnaud Fabre committed
1
- extends 'base.html'
Arnaud Fabre's avatar
Arnaud Fabre committed
2
3

- load humanize
4
- load memopol_tags
Jamesie Pic's avatar
Jamesie Pic committed
5
- load representatives_recommendations_tags
Arnaud Fabre's avatar
Arnaud Fabre committed
6
7
8

- block head
  {{ position_form.media }}
Arnaud Fabre's avatar
Arnaud Fabre committed
9
10

- block content
Arnaud Fabre's avatar
Arnaud Fabre committed
11
12
  .row
    .col-md-6
Jamesie Pic's avatar
Jamesie Pic committed
13
      - include 'representatives/_representative_block.html' with representative=representative
14
      - include 'representatives/_representative_contact.html' with representative=representative
15

Arnaud Fabre's avatar
Arnaud Fabre committed
16
17
18
19
20
21
    .col-md-6
      %h2#votes Votes

      %table.table.table-condensed.votes
        %tr
          %th Title
22
          %th Date
Arnaud Fabre's avatar
Arnaud Fabre committed
23
24
25
26
27
28
29
          %th.icon-cell
            Memopol recommendation
          %th.icon-cell
            Representative vote
          %th.icon-cell
            Score

Jamesie Pic's avatar
Jamesie Pic committed
30
        - for vote in votes
Arnaud Fabre's avatar
Arnaud Fabre committed
31
32
          %tr
            %td= vote.proposal.recommendation.title
33
34
            %td.date-cell
              = vote.proposal.datetime|date:'N j, Y'
Arnaud Fabre's avatar
Arnaud Fabre committed
35
36
37
38
39
            %td.icon-cell
              = vote.proposal.recommendation.recommendation|position_icon
            %td.icon-cell
              = vote.position|position_icon
            %td.icon-cell
40
              = vote.score|score_label
Arnaud Fabre's avatar
Arnaud Fabre committed
41
42
43
44
45


  %h2 Mandates

  %table.table.table-condensed.mandates
Jamesie Pic's avatar
Jamesie Pic committed
46
    - for mandate in mandates
Arnaud Fabre's avatar
Arnaud Fabre committed
47
48
49
      %tr.mandate
        %td= mandate.role
        %td
50
          %a{:href => "{% group_url mandate.group %}"}
Jamesie Pic's avatar
Jamesie Pic committed
51
52
53
            {{ mandate.group.name }}
            - if mandate.group.abbreviation
              {{ mandate.group.abbreviation }}
54
55
56
57
58
59
        %td
          - if mandate.begin_date
            = mandate.begin_date|mandate_date:'d/m/Y'
        %td
          - if mandate.end_date
            = mandate.end_date|mandate_date:'d/m/Y'
Arnaud Fabre's avatar
Arnaud Fabre committed
60
61
62
63
64
65
        %td= mandate.constituency.name

  .positions
    %h2 Public positions

    %table.table.table-condensed
Jamesie Pic's avatar
Jamesie Pic committed
66
      - for position in positions
Arnaud Fabre's avatar
Arnaud Fabre committed
67
        %tr.position
68
          %td= position.datetime|naturalday:'d/m/Y'
Arnaud Fabre's avatar
Arnaud Fabre committed
69
          %td
Jamesie Pic's avatar
Jamesie Pic committed
70
            %a{:href => '{{ position.get_absolute_url }}'}
Arnaud Fabre's avatar
Arnaud Fabre committed
71
              =position.text|truncatewords:8
Arnaud Fabre's avatar
Arnaud Fabre committed
72
          %td
73
            %a{:href => '{{ position.link }}'}
Arnaud Fabre's avatar
Arnaud Fabre committed
74
75
              = position.link

76
    - include 'representatives_positions/_form.html' with form=position_form