Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanBigOne committed Jan 4, 2019
2 parents b435dbe + 184a379 commit 0e679c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ That's all...

## Versions

### 2.0.1
- Result page : display the exact percentage instead of 50% in the explanation sentence

### 2.0.0
- Add Advanced option : Admin link, limit max users, send links by mail, Facebook sharing, asking name of users

Expand Down
9 changes: 8 additions & 1 deletion templates/vote/result.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,19 @@
</table>
<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
{% set valueBetter=0 %}
{% for choice in proposal.choices %}
{% if choice.label==result[0].candidate.label %}

{% for mention_value,mention_label in mentions %}
{% set valueMention=meritProfiles[choice.id][mention_value] %}
{% if valueBetter<=50 %}
{% set valueBetter=valueBetter+valueMention %}
{% endif %}

{% if valueMention>1 %}
<td style="height:15px;white-space: nowrap;color:#ffffff;padding:5px;text-center;width:{{ valueMention|round(2,'floor') }}%;background-color:#{{ mention_colors[mention_value] }}">

</td>
{# {{ valueMention|round(2,'floor')|number_format(2, '.', ',') }}% #}
{% endif %}
Expand All @@ -66,7 +72,8 @@
<td style="width:40%;text-align:center;">50%</td>
<td style="width:30%;text-align:right;">100%</td>
</table>
<p class="mt-2"><small class="text-muted">*50% des participants considèrent que ce candidat (ou cette proposition) est au moins "{{ winnerMention }}"</small></p>
{# <p class="mt-2"><small class="text-muted">*{{ valueBetter|round(2,'floor') }}% des participants considèrent que ce candidat (ou cette proposition) est au moins "{{ winnerMention }}"</small></p>#}
<p class="mt-2"><small class="text-muted">* La majorité des participants considère que ce candidat/proposition est au moins "{{ winnerMention }}".</small></p>

</div>
</div>
Expand Down

0 comments on commit 0e679c5

Please sign in to comment.