]> WPIA git - motion.git/blob - templates/motion.html
Merge branch 'translation' into 'master'
[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')}}: {{_('%(dt)s (UTC) by %(user)s', dt=motion.posed|timestamp, user=motion.poser)}}</div>
17 {%- if motion.canceled != None %}
18       <div>{{_('Canceled')}}: {{_('%(dt)s (UTC) by %(user)s', dt=motion.canceled|timestamp, user=motion.poser)}}</div>
19 {%- else %}
20       <div>{{_('Votes until')}}: {{_('%(dt)s (UTC)', dt=motion.deadline|timestamp)}}</div>
21 {%- endif %}
22      </div>
23   </div>
24   <div class="card-body">
25     <p>{{motion.content|markdown}}</p>
26 {%- if motion.yes or motion.no or motion.abstain %}
27     <p>
28 {%- for vote in ['yes', 'no', 'abstain'] %}
29 {{_(vote)|capitalize}} <span class="badge badge-pill badge-secondary">{{motion[vote]}}</span><br>
30 {%- endfor %}
31     </p>
32 {%- endif %}
33 {%- if motion.canceled != None %}
34     <p>{{_('Cancelation reason')}}: {{motion.cancelation_reason}}</p>
35 {%- endif %}
36   </div>
37 {%- block content %}{% endblock %}
38 </div>