]> WPIA git - motion.git/blob - templates/motion.html
add: close motion on request
[motion.git] / templates / motion.html
1 <div class="motion card" id="motion-{{motion.id}}">
2   <div class="motion-title card-heading 
3   {%- if motion.running %} alert-light
4 {%- elif motion.canceled %} alert-warning
5 {%- elif motion.yes is defined %}{% if motion.yes != None and motion.no != None and motion.yes > motion.no %} alert-success{% else %} alert-danger{% endif %}
6 {%- else %} bg-light{%- endif -%}
7 ">
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># {{motion.identifier}}
11 {%- if singlemotion == False %}
12     <a class="btn btn-primary" href="/motion/{{motion.identifier}}" role="button">{{ 'Vote' if motion.running else 'Result' }}</a>
13 {%- endif %}
14     </div>
15     <div class="date">
16       <div>Proposed: {{motion.posed|timestamp}} (UTC) by {{motion.poser}}</div>
17 {%- if motion.canceled != None %}
18       <div>Canceled: {{motion.canceled|timestamp}} (UTC) by {{motion.canceler}}</div></div>
19 {%- else %}
20       <div>Votes until: {{motion.deadline|timestamp}} (UTC)</div></div>
21 {%- endif %}
22   </div>
23   <div class="card-body">
24     <p>{{motion.content|markdown}}</p>
25 {%- if motion.yes or motion.no or motion.abstain %}
26     <p>
27 {%- for vote in ['yes', 'no', 'abstain'] %}
28 {{vote|capitalize}} <span class="badge badge-pill badge-secondary">{{motion[vote]}}</span><br>
29 {%- endfor %}
30     </p>
31 {%- endif %}
32 {%- if motion.canceled != None %}
33     <p>Cancelation reason: {{motion.cancelation_reason}}</p>
34 {%- endif %}
35   </div>
36 {%- block content %}{% endblock %}
37 </div>