Commit 931c563f authored by Robin's avatar Robin

Working theme details.

parent 03acbc86
- 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
{% extends "base.html" %}
{% load i18n %}
{% load memopol_tags %}
{% block content %}
<h1>{{ theme.name }}</h1>
<h2>
{% trans "Description" %}
</h2>
<p class="description">
{{ theme.description }}
</p>
<h2>
{% trans "Links" %}
</h2>
<table>
{% for link in theme.links.all %}
<tr>
<td>
<a class="external" href="{{ link.link }}" target="_blank">
{{ link.title }}
</a>
</td>
<td>
{{ link.datetime }}
</td>
</tr>
{% endfor %}
</table>
<h2>
{% trans "Dossiers" %}
</h2>
<table>
<tr>
<th>
{% trans "Chambers" %}
</th>
<th>
{% trans "Dossier" %}
</th>
<th>
{% trans "Reference" %}
</th>
</tr>
{% for dossier in theme.dossiers.all %}
<tr>
<td>
{% for chamber in dossier.chambers %}
{{ chamber|chamber_small_icon }}
{% endfor %}
</td>
<td>
<a href="{% url 'dossier-detail' dossier.pk %}">
{{ dossier.title }}
</a>
</td>
<td>
{{ dossier.reference }}
</td>
</tr>
{% endfor %}
</table>
<h2>
{% trans "Proposals" %}
</h2>
<table>
<tr>
<th>
{% trans "Chambers" %}
</th>
<th>
{% trans "Dossier" %}
</th>
<th>
{% trans "Reference" %}
<th>
{% trans "Proposal" %}
</th>
<th>
{% trans "Title" %}
</th>
<th>
{% trans "Recommendation" %}
</th>
<th>
{% trans "Status" %}
</th>
<th>{{ "for"|position_icon }}</th>
<th>{{ "against"|position_icon }}</th>
<th>{{"abstain"|position_icon }}</th>
</tr>
{% for proposal in theme.proposals.all %}
<tr>
<td>
{% for chamber in proposal.dossier.chambers %}
{{ chamber | chamber_small_icon }}
{% endfor %}
</td>
<td>
<a href="{% url 'dossier-detail' proposal.dossier.pk %}">
{{ proposal.dossier.title }}
</a>
<td>
{{ proposal.dossier.reference }}
</td>
<td>
{{ proposal.title }}
<br>
<small>
{{ proposal.reference }}
</small>
</td>
{% if proposal.recommendation %}
<td>{{ proposal.recommendation.title }}</td>
<td>{{ proposal.recommendation.recommendation|position_icon }}</td>
{% else %}
<td class="no-recommendation" colspan="2">No recommendation</td>
<td>{{ proposal.status }}</td>
<td>{{ proposal.total_for }}</td>
<td>{{ proposal.total_against }}</td>
<td>{{ proposal.total_abstain }}</td>
{% endif %}
</tr>
{% endfor %}
</table>
<h2>
{% trans "Positions" %}
</h2>
<table>
<tr>
<th>
{% trans "Representative" %}
</th>
<th>
{% trans "Date" %}
</th>
<th>
{% trans "Position" %}
</th>
<th>
{% trans "Link" %}
</th>
</tr>
{% for position in theme.positions.all %}
<tr class="position">
<td>
{{ position.representative }}
</td>
<td>{{ position.datetime }}</td>
<td>
<a href="{{ position.get_absolute_url }}">
{{ position.text|truncatewords:8 }}
</a>
</td>
<td>
<a href="{{ position.link }}">
{{ position.link }}
</a>
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment