theme_detail.haml 2.58 KB
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
34
35
36
37
38
39
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
- extends "base.html"

- load i18n
- load memopol_tags

- block content

  %h1 {{ theme.name }}

  %h2
    - trans "Description"

  %p.description
    {{ theme.description }}

  %h2
    - trans "Links"

  %table.table

    - for link in theme.links.all
      %tr
        %td
          %a.external{'href': '{{ link.link }}', target:'_blank'}
              = link.title
        %td
          = link.datetime

  %h2
    - trans "Dossiers"

  %table.table
    %tr
      %th
        - trans "Chambers"
      %th
        - trans "Dossier"
      %th
        - trans "Reference"

    - for dossier in theme.dossiers.all
      %tr
        %td
          - for chamber in dossier.chambers
            = chamber | chamber_small_icon
        %td
          %a{'href': "{% url 'dossier-detail' dossier.pk %}"}
            {{ dossier.title }}

        %td= dossier.reference

  %h2
    - trans "Proposals"

  %table.table
    %tr
      %th
        - trans "Chambers"
      %th
        - trans "Dossier"
      %th
        - trans "Reference"
      %th
        - trans "Proposal"
      %th
        - trans "Title"
      %th
        - trans "Recommendation"
      %th
        - trans "Status"
      %th= "for" | position_icon
      %th= "against" | position_icon
      %th= "abstain" | position_icon

    - for proposal in theme.proposals.all

      %tr
        %td
          - for chamber in proposal.dossier.chambers
            = chamber | chamber_small_icon
        %td
          %a{'href': "{% url 'dossier-detail' proposal.dossier.pk %}"}
            {{ proposal.dossier.title }}

        %td= proposal.dossier.reference

        %td
          = proposal.title
          %br
          %small
            {{ proposal.reference }}

        - if proposal.recommendation

          %td= proposal.recommendation.title
          %td= proposal.recommendation.recommendation | position_icon

        - else
          %td.no-recommendation{colspan:2}= "No recommendation"

        %td= proposal.status
        %td= proposal.total_for
        %td= proposal.total_against
        %td= proposal.total_abstain


  %h2
    - trans "Positions"

  %table.table
    %tr
      %th
        - trans "Representative"
      %th
        - trans "Date"
      %th
        - trans "Position"
      %th
        - trans "Link"

      - for position in theme.positions.all

        %tr.position
          %td
            = position.representative
          %td= position.datetime
          %td
            %a{:href => '{{ position.get_absolute_url }}'}
              =position.text|truncatewords:8
          %td
            %a{:href => '{{ position.link }}'}
              = position.link