Commit 1054bba0 authored by Nicolas Joyard's avatar Nicolas Joyard
Browse files

Add vote dates and sort by date

parent e871ddf5
......@@ -3,6 +3,7 @@
<table class='table table-condensed votes'>
<tr>
<th>Title</th>
<th>Date</th>
<th class='icon-cell'>
Memopol recommendation
</th>
......@@ -17,14 +18,15 @@
<tr>
<td>Stop acta !</td>
<td class='date-cell'>Nov.24,2010</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
<i aria-label="against" class="fa fa-thumbs-down vote_negative" title="against" ></i>
</td>
<td class='icon-cell'>
<span class="label label-success">4</span>
<span class="label label-danger">-6</span>
</td>
......@@ -32,6 +34,7 @@
<tr>
<td>Stop acta !</td>
<td class='date-cell'>Nov.24,2010</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
......@@ -47,14 +50,15 @@
<tr>
<td>Stop acta !</td>
<td class='date-cell'>Nov.24,2010</td>
<td class='icon-cell'>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<i aria-label="against" class="fa fa-thumbs-down vote_negative" title="against" ></i>
<i aria-label="for" class="fa fa-thumbs-up vote_positive" title="for" ></i>
</td>
<td class='icon-cell'>
<span class="label label-danger">-6</span>
<span class="label label-success">4</span>
</td>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.66ec921b2740.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.66ec921b2740.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.66ec921b2740.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.66ec921b2740.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......
......@@ -10,7 +10,7 @@
- The Political Memory of </title>
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.66ec921b2740.css" type="text/css" />
<link rel="stylesheet" href="/static/collected/libs/bootstrap/dist/css/bootstrap.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/fontawesome/css/font-awesome.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/libs/flag-icon-css/css/flag-icon.min.css" type="text/css" /><link rel="stylesheet" href="/static/collected/CACHE/css/base.3c5ffeab3cbf.css" type="text/css" />
<script type="text/javascript" src="/static/collected/libs/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="/static/collected/libs/bootstrap/dist/js/bootstrap.js"></script>
......
......@@ -66,7 +66,8 @@ class RepresentativeDetail(representatives_views.RepresentativeDetail):
'votes',
queryset=VoteScore.objects.filter(
proposal__in=Proposal.objects.exclude(recommendation=None),
).select_related('proposal__recommendation')
).select_related('proposal__recommendation').order_by(
'-proposal__datetime')
)
)
return qs
......
......@@ -36,6 +36,10 @@
color: #333;
}
.date-cell {
white-space: nowrap;
}
.representative_grid {
display: flex;
flex-wrap: wrap;
......
......@@ -20,6 +20,7 @@
%table.table.table-condensed.votes
%tr
%th Title
%th Date
%th.icon-cell
Memopol recommendation
%th.icon-cell
......@@ -30,6 +31,8 @@
- for vote in votes
%tr
%td= vote.proposal.recommendation.title
%td.date-cell
= vote.proposal.datetime|date:'N j, Y'
%td.icon-cell
= vote.proposal.recommendation.recommendation|position_icon
%td.icon-cell
......
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