]> WPIA git - motion.git/blob - templates/motion.html
fix finished motions without votes
[motion.git] / templates / motion.html
1 <div class="motion panel
2 {%- if motion.running %} panel-default
3 {%- elif motion.canceled %} panel-warning
4 {%- elif motion.yes is defined %}{% if motion.yes != None and motion.no != None and motion.yes > motion.no %} panel-success{% else %} panel-danger{% endif %}
5 {%- else %} panel-default{%- endif -%}
6 " id="motion-{{motion.id}}">
7   <div class="motion-title panel-heading">
8     <span class="title-text">{{motion.name}}</span> ({{ 'Running' if motion.running else ('Canceled' if motion.canceled != None else 'Finished') }})
9     <span class="motion-type">{{motion.type}}</span>
10     <div># <a href="/motion/{{motion.identifier}}" class="anchor">{{motion.identifier}}</a></div>
11     <div class="date">
12       <div>Posed: {{motion.posed|timestamp}} by {{motion.poser}}</div>
13 {%- if motion.canceled != None %}
14       <div>Canceled: {{motion.canceled|timestamp}} by {{motion.canceler}}</div></div>
15 {%- else %}
16       <div>Votes until: {{motion.deadline|timestamp}}</div></div>
17 {%- endif %}
18   </div>
19   <div class="panel-body">
20     <p>{{motion.content}}</p>
21 {%- if motion.yes or motion.no or motion.abstain %}
22     <p>
23 {%- for vote in ['yes', 'no', 'abstain'] %}
24 {{vote|capitalize}} <span class="badge">{{motion[vote]}}</span><br>
25 {%- endfor %}
26     </p>
27 {%- endif %}
28 {%- if motion.canceled != None %}
29     <p>Cancelation reason: {{motion.cancelation_reason}}</p>
30 {%- endif %}
31   </div>
32 {%- block content %}{% endblock %}
33 </div>