+<div class="span3">
+<h2 class="page-header">Informations</h2>
+<div class="progress progress-striped progress-{% if vote.nb_votes > 0 and vote.nb_votes / vote.max_votes >= vote.quorum %}success{% else %}danger{% endif %}">
+ <div class="bar" style="width: {{ vote.percent }}%;">
+ <strong>{{ vote.nb_votes }} vote{{ 's' if vote.nb_votes > 1 else '' }} / {{ vote.max_votes }} ({{ vote.percent }}%)</strong></div>
+</div>
+<dl class="dl-horizontal">
+ <dt>Publié par <dd><code>{{ vote.author }}</code>
+ <dt>Début le <dd><code>{{ vote.date_begin }}</code>
+ <dt>Fin le <dd><code>{{ vote.date_end }}</code>
+ <dt>Groupe <dd><code>{{ vote.groupname }}</code>
+ <dt>Catégorie <dd><code>{{ vote.category }}</code>
+ <dt>Quorum <dd><code>{{ vote.quorum * 100 }}%</code>
+</dl>
+<dl>
+ {% if vote.description %}
+ <dt>Description : <dd>{{ vote.description }}
+ {% endif %}
+ {% if attachments %}
+ <dt>Documents :<dd>
+ <ul>
+ {% for attachment in attachments %}
+ <li><a href="{{ attachment.url }}">{{ attachment.url }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+</dl>
+</div>
+
+{% if vote.is_transparent or (session.user and user.userid == session.user.id )%}
+<div class="span8">
+ <h2 class='page-header'>Résultats</h2>
+ <svg class="results cardinal-{{ vote.id_cardinal }}"
+ width="{{ 150 + (100 * 5) + 100 + 100 }}"
+ height="{{25 + results.list|length * 20 + 40}}">
+ <g class="choice" transform="translate(100,0)">
+ <text class="choice-legend" x="-10" y="9.5" dy=".35em">Légende :</text>
+ {% for value in values %}
+ <g transform="translate({{ (loop.index0 * 750 / loop.length) }},0)">
+ <rect width="{{ 750 / loop.length + 1 }}" height="18"></rect>
+ <rect class="{{ value.class }}" x="1" y ="0" width="{{ 750 / loop.length - 1}}" height="18"></rect>
+ <text class="choice-legend-item" text-anchor="start" x="{{ 750 / loop.length - 2 }}" y="9.5" dy=".35em"
+ >{{ value.name }}</text>
+ </g>
+ {% endfor %}
+ </g>
+ <g transform="translate({{150 + (100 * 5) + 35}},20)">
+ <text class="choice-sum-legend" x="20" y="9.5" dy=".35em">somme↓</text>
+ </g>
+ <g transform="translate({{150 + (100 * 5) + 115}},20)">
+ <text class="choice-average-legend" x="20" y="9.5" dy=".35em">moyenne↓</text>
+ </g>
+ {% for choice in results.list %}
+ <g class="choice" transform="translate(150,{{ 35 + loop.index0 * 20 }})">
+ <text class="choice" x="-10" y="9.5" dy=".35em">{{ choice.name }}</text>
+ </g>
+ {% set choice_loop = loop %}
+ {% for value in choice.values_ %}
+ <g transform="translate({{ 150 + (value.previous_percent * 5) }},{{ 35 + choice_loop.index0 * 20 }})">
+ {% if value.percent > 0 %}
+ <rect class="{{ value.class }}" width="{{ (value.percent * 5)|int }}" height="19"></rect>
+ <text text-anchor="middle" x="{{ (value.percent * 5 / 2 + 10)|int }}" y="9.5" dy=".35em"
+ >{{ value.percent|int }}%</text>
+ {% endif %}
+ </g>
+ {% endfor %}
+ <g transform="translate({{150 + (100 * 5) + 35}},{{35 + loop.index0 * 20}})">
+ <text class="choice-sum" x="20" y="9.5" dy=".35em">{{ choice.sum }}</text>
+ </g>
+ <g transform="translate({{150 + (100 * 5) + 115}},{{35 + loop.index0 * 20}})">
+ <text class="choice-average" x="20" y="9.5" dy=".35em">{{ "%.2f"|format(choice.average) }}</text>
+ </g>
+ {% if loop.length > 1 and choice.id in results.medians %}
+ <g transform="translate({{150 + (100 * 5) + 125}},{{35 + loop.index0 * 20}})">
+ <text class="choice-median" x="75" y="9.5" dy=".35em">← médiane</text>
+ </g>
+ {%endif%}
+ {% endfor %}
+ <g class="axis" transform="translate(150,{{35 + results.list|length * 20}})">
+ <g transform="translate(0,0)" style="opacity: 1;" class="tick">
+ <line x1="0" y1="6" x2="0" y2="0"></line>
+ <text style="text-anchor: middle;" dy=".71em" x="0" y="9">0%</text>
+ </g>
+ <g transform="translate(125,0)" style="opacity: 1;" class="tick">
+ <line x1="0" y1="6" x2="0" y2="0"></line>
+ <text style="text-anchor: middle;" dy=".71em" x="0" y="9">25%</text>
+ </g>
+ <g transform="translate(250,0)" style="opacity: 1;" class="tick">
+ <line x1="0" y1="6" x2="0" y2="0"></line>
+ <text style="text-anchor: middle;" dy=".71em" x="0" y="9">50%</text>
+ </g>
+ <g transform="translate(375,0)" style="opacity: 1;" class="tick">
+ <line x1="0" y1="6" x2="0" y2="0"></line>
+ <text style="text-anchor: middle;" dy=".71em" x="0" y="9">75%</text>
+ </g>
+ <g transform="translate(500,0)" style="opacity: 1;" class="tick">
+ <line x1="0" y1="6" x2="0" y2="0"></line>
+ <text style="text-anchor: middle;" dy=".71em" x="0" y="9">100%</text>
+ </g>
+ <path d="M0,6V0H500V6" class="domain"></path>
+ </g>
+ </svg>
+</div>
+{% endif %}
+