mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
/tu/{proposal_id}: Do not show voters if there are none
This was different than PHP. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
04ab98907a
commit
97c1247b57
2 changed files with 7 additions and 5 deletions
|
@ -111,7 +111,7 @@ def render_proposal(request: Request,
|
||||||
""" Render a single TU proposal. """
|
""" Render a single TU proposal. """
|
||||||
context["proposal"] = proposal
|
context["proposal"] = proposal
|
||||||
context["voteinfo"] = voteinfo
|
context["voteinfo"] = voteinfo
|
||||||
context["voters"] = voters
|
context["voters"] = voters.all()
|
||||||
|
|
||||||
participation = voteinfo.ActiveTUs / voteinfo.total_votes() \
|
participation = voteinfo.ActiveTUs / voteinfo.total_votes() \
|
||||||
if voteinfo.total_votes() else 0
|
if voteinfo.total_votes() else 0
|
||||||
|
|
|
@ -5,9 +5,11 @@
|
||||||
{% include "partials/tu/proposal/details.html" %}
|
{% include "partials/tu/proposal/details.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if voters %}
|
||||||
<div class="box">
|
<div class="box">
|
||||||
{% include "partials/tu/proposal/voters.html" %}
|
{% include "partials/tu/proposal/voters.html" %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
{% if error %}
|
{% if error %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue