]> WPIA git - motion.git/blob - templates/single_motion.html
c53e4b51307bb67b66d5b7079662fa89bc8c8c29
[motion.git] / templates / single_motion.html
1 {% extends "base.html" %}
2 {% block title -%}
3 Motion: {{motion.name}}
4 {%- endblock %}
5 {% block body %}
6 {%- include 'motion.html' %}
7 {%- if votes %}
8 <div class="motion card" id="votes">
9   <div class="card-heading text-white bg-info">
10     Motion Votes
11   </div>
12   <div class="card-body">
13     {%- for row in votes %}
14     <div>{{row.email}}: {{row.result}}{%- if row.proxyemail %} : given by {{row.proxyemail}}{%- endif %}</div>
15     {%- endfor %}
16   </div>
17 </div>
18 {%- endif %}
19
20 {%- if motion.running %}
21
22 {%- if may_vote %}
23 <div class="panel panel-info" id="votes">
24   <div class="panel-body">
25 <h3>My vote</h3>
26 {%- if proxyname %}
27 Given by {{proxyname[0][0]}}
28 {%- endif %}
29 <form action="/motion/{{motion.identifier}}/vote/{{g.voter}}" method="POST">
30 {%- for vote in ['yes','no','abstain'] %}
31 <button type="submit" class="btn btn-{{ 'success' if vote == motion.result else 'primary' }}" name="vote" value="{{vote}}" id="vote-{{vote}}">{{vote}}</button>
32 {%- endfor %}
33 </form>
34
35 {%- for p in proxyvote %}
36 <h3>Vote for {{p.email}}</h3>
37 {%- if p.owneremail and p.result%}
38 Voted by {{p.owneremail}}
39 {%- endif %}
40 <form action="/motion/{{motion.identifier}}/vote/{{p.voter_id}}" method="POST">
41 {%- for vote in ['yes','no','abstain'] %}
42 <button type="submit" class="btn btn-{{ 'success' if vote == p.result else 'primary' }}" name="vote" value="{{vote}}" id="vote-{{vote}}">{{vote}}</button>
43 {%- endfor %}
44 </form>
45 {%- endfor %}
46 {%- endif %}
47
48 {%- if may_cancel %}
49 <form action="/motion/{{motion.identifier}}/cancel" method="POST" class="form-inline">
50 <input type="text" placeholder="cancelation reason" name="reason" class="form-control" required="yes">
51 <button type="submit" class="btn btn-danger" name="cancel" value="cancel" id="cancel">Cancel</button></br>
52 </form>
53 {%- endif %}
54 {%- if may_finish %}
55 <form action="/motion/{{motion.identifier}}/finish" method="POST" class="form-inline">
56 <button type="submit" class="btn btn-danger" name="finish" value="finish" id="finish">Finish</button></br>
57 </form>
58 {%- endif %}
59
60 {%- endif %}
61 <a href="/?start={{motion.id}}#motion-{{motion.id}}" class="btn btn-primary">Back</a>
62 {%- endblock %}
63   </div>
64 </div>