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