]> WPIA git - motion.git/blobdiff - templates/motion.html
Merge branch 'translation' into 'master'
[motion.git] / templates / motion.html
index bcead1fc573ae89ec89326a2b3874b049ef0d9a6..edc637a28e82d3dee6aa3f4713c690e914c319ff 100644 (file)
@@ -1,32 +1,37 @@
-<div class="motion panel
-{%- if motion.running %} panel-default
-{%- elif motion.canceled %} panel-warning
-{%- elif motion.yes is defined %}{% if motion.yes > motion.no %} panel-success{% else %} panel-danger{% endif %}
-{%- else %} panel-default{%- endif -%}
-" id="motion-{{motion.id}}">
-  <div class="motion-title panel-heading">
-    <span class="title-text">{{motion.name}}</span> ({{ 'Running' if motion.running else ('Canceled' if motion.canceled != None else 'Finished') }})
+<div class="motion card" id="motion-{{motion.id}}">
+  <div class="motion-title card-heading 
+  {%- if motion.running %} alert-light
+{%- elif motion.canceled %} alert-warning
+{%- elif motion.yes is defined %}{% if motion.yes != None and motion.no != None and motion.yes > motion.no %} alert-success{% else %} alert-danger{% endif %}
+{%- else %} bg-light{%- endif -%}
+">
+    <span class="title-text">{{motion.name}}</span> ({{ _('Running') if motion.running else (_('Canceled') if motion.canceled != None else _('Finished')) }})
     <span class="motion-type">{{motion.type}}</span>
-    <div># <a href="/motion/{{motion.identifier}}" class="anchor">{{motion.identifier}}</a></div>
+    <div># {{motion.identifier}}
+{%- if singlemotion == False %}
+    <a class="btn btn-primary" href="/motion/{{motion.identifier}}" role="button">{{ _('Vote') if motion.running else _('Result') }}</a>
+{%- endif %}
+    </div>
     <div class="date">
-      <div>Posed: {{motion.posed|timestamp}} by {{motion.poser}}</div>
+      <div>{{_('Proposed')}}: {{_('%(dt)s (UTC) by %(user)s', dt=motion.posed|timestamp, user=motion.poser)}}</div>
 {%- if motion.canceled != None %}
-      <div>Canceled: {{motion.canceled|timestamp}} by {{motion.canceler}}</div></div>
+      <div>{{_('Canceled')}}: {{_('%(dt)s (UTC) by %(user)s', dt=motion.canceled|timestamp, user=motion.poser)}}</div>
 {%- else %}
-      <div>Votes until: {{motion.deadline|timestamp}}</div></div>
+      <div>{{_('Votes until')}}: {{_('%(dt)s (UTC)', dt=motion.deadline|timestamp)}}</div>
 {%- endif %}
+     </div>
   </div>
-  <div class="panel-body">
-    <p>{{motion.content}}</p>
+  <div class="card-body">
+    <p>{{motion.content|markdown}}</p>
 {%- if motion.yes or motion.no or motion.abstain %}
     <p>
 {%- for vote in ['yes', 'no', 'abstain'] %}
-{{vote|capitalize}} <span class="badge">{{motion[vote]}}</span><br>
+{{_(vote)|capitalize}} <span class="badge badge-pill badge-secondary">{{motion[vote]}}</span><br>
 {%- endfor %}
     </p>
 {%- endif %}
 {%- if motion.canceled != None %}
-    <p>Cancelation reason: {{motion.cancelation_reason}}</p>
+    <p>{{_('Cancelation reason')}}: {{motion.cancelation_reason}}</p>
 {%- endif %}
   </div>
 {%- block content %}{% endblock %}