Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anthony
memopol
Commits
1054bba0
Commit
1054bba0
authored
Jun 02, 2016
by
Nicolas Joyard
Browse files
Add vote dates and sort by date
parent
e871ddf5
Changes
9
Hide whitespace changes
Inline
Side-by-side
memopol/tests/RepresentativeDetailTest/test_votes_display.html
View file @
1054bba0
...
...
@@ -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_
posi
tive"
title=
"
for
"
></i>
<i
aria-label=
"
against
"
class=
"fa fa-thumbs-
down
vote_
nega
tive"
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_
nega
tive"
title=
"
against
"
></i>
<i
aria-label=
"
for
"
class=
"fa fa-thumbs-
up
vote_
posi
tive"
title=
"
for
"
></i>
</td>
<td
class=
'icon-cell'
>
<span
class=
"label label-
danger"
>
-6
</span>
<span
class=
"label label-
success"
>
4
</span>
</td>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content
View file @
1054bba0
...
...
@@ -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>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
View file @
1054bba0
...
...
@@ -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>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content
View file @
1054bba0
...
...
@@ -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>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
View file @
1054bba0
...
...
@@ -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>
...
...
memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
View file @
1054bba0
...
...
@@ -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>
...
...
memopol/views.py
View file @
1054bba0
...
...
@@ -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
...
...
static/less/legislature.less
View file @
1054bba0
...
...
@@ -36,6 +36,10 @@
color: #333;
}
.date-cell {
white-space: nowrap;
}
.representative_grid {
display: flex;
flex-wrap: wrap;
...
...
templates/representatives/representative_detail.haml
View file @
1054bba0
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment