Commit 4ae5ac4c authored by Nicolas Joyard's avatar Nicolas Joyard

Add 'no recommendation' label to dossier detail and #proposals to dossier list

parent 2f172532
......@@ -17,6 +17,7 @@ class DossierList(PaginationMixin, generic.ListView):
'proposals',
'proposals__recommendation'
).annotate(
nb_proposals=Count('proposals'),
nb_recomm=Count('proposals__recommendation')
).order_by('-nb_recomm', '-reference')
......
......@@ -17,4 +17,9 @@ table.detail-view {
.grid-list-selector {
// text-align: right;
}
.no-recommendation {
font-style: italic;
text-align: center;
}
\ No newline at end of file
......@@ -34,8 +34,15 @@
%small
{{ proposal.reference }}
{{ proposal.kind }}
%td= proposal.recommendation.title
%td= proposal.recommendation.recommendation | position_icon
- 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
......
......@@ -29,6 +29,8 @@
- trans "Title"
%th
- trans "Recommendations"
%th
- trans "Proposals"
%th
- trans "Reference"
......@@ -38,6 +40,7 @@
%a{'href': "{% url 'dossier-detail' dossier.pk %}"}
{{ dossier.title }}
%td= dossier.nb_recomm
%td= dossier.nb_proposals
%td= dossier.reference
- include "core/blocks/pagination.html"
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