summaryrefslogtreecommitdiff
path: root/templates/analyse.html
blob: 70fb98eec210e2af07ba7b39f2a0f99fa1f2d547 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{% include 'base.html' %}

{% if users %}

Tutkit kyselyä: {{ code }}


<div class="kysQuestion"><div class="kysScale">
<form action="/set/compare" method="POST">
<input type="submit" value="Vertaa" class="kysButton">
<select class="kysSelectU1 kysSelect" name="user1">
{% for user in users %}
 {% if user1==user.id %}
  <option value="{{ user.id }}" selected>{{ user.nick }}</option>
 {% else %}
  <option value="{{ user.id }}">{{ user.nick }}</option>
 {% endif %}
{% endfor %}
</select>
<select class="kysSelectU2 kysSelect" name="user2">
{% for user in users %}
 {% if user2==user.id %}
  <option value="{{ user.id }}" selected>{{ user.nick }}</option>
 {% else %}
  <option value="{{ user.id }}">{{ user.nick }}</option>
 {% endif %}
{% endfor %}
</select>
<div class="kysScaleSpacer"></div>
</form>
</div></div>

{% endif %}

{% if code %}

<div id="questions" class="kysQuestions">
 <div class="kysQuestion">
  <div class="kysTotal">{{ avg }}%</div>
 </div>
{% for q in questions %}
<div class="kysQuestion">
 <div class="kysText">{{ q.q }} ({{ q.c }}%)</div>
 <input class="kysAnswer kysUser1" type="range" min="0" max="999"
        value="{{ q.a1 }}" disabled="">
 <input class="kysAnswer kysUser2" type="range" min="0" max="999"
        value="{{ q.a2 }}" disabled="">
 <div class="kysScale">
  <div class="kysNegative">{{ q.n }}</div>
  <div class="kysScaleSpacer"></div>
  <div class="kysPositive">{{ q.p }}</div>
 </div>
</div>
{% endfor %}

</div>

{% endif %}

<form action="/set/answer_id" method="POST">
Vaihda kyselyn koodia:
<input type="text" name="link">
<input type="text" name="next" value="analyse" hidden="true">
<input type="submit" value="Vaihda">
</form>

{% if code %}
Linkki tähän kyselyyn:
<a href="http://anal.fi:5000/kys/{{ code }}">
 http://anal.fi:5000/kys/{{ code }}
</a>
{% endif %}