-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdispset.html
140 lines (136 loc) · 3.63 KB
/
dispset.html
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{#
mjvocabulary - Simple Google AppEngine based vocabulary tester
Copyright (C) 2012 Martin Jambor
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "base.html" %}
{% block title %}Vocabulary test - {{ name }}{% endblock %}
{% block body_tag %}
{% if afteredit %}
<body OnLoad="document.addform.word.focus();">
{% else %}
<body>
{% endif %}
{% endblock %}
{% block content %}
<h1>{{ name }}</h1>
<p> {{ extra_info }} </p>
<hr>
<table>
<tr>
<td>
<form action="/test" method="post">
<input name="tsid" type="hidden" value="{{ tsid }}">
<input type="submit" value="Start test">
</form>
</td>
<td>
<form action="/renameset" method="post">
<input name="tsid" type="hidden" value="{{ tsid }}">
<input name="set_name" type="text" size="20" maxlength="30"
value="{{ name }}">
<input type="submit" value="Rename this set">
</form>
</td>
<td>
<form action="/importset" method="post">
<input name="tsid" type="hidden" value="{{ tsid }}">
<input type="submit" value="Import">
</form>
</td>
<td>
<form action="/exportset" method="post">
<input name="tsid" type="hidden" value="{{ tsid }}">
<input type="submit" value="Export">
</form>
</td>
<td>
<form action="/resetset" method="post">
<input name="tsid" type="hidden" value="{{ tsid }}">
<input type="submit" value="Reset all">
</form>
</td>
<td>
<form action="/delset" method="post">
<input name="tsid" type="hidden" value="{{ tsid }}">
<input type="submit" value="Delete this set">
</form>
</td>
</tr>
</table>
<hr>
{% if words is iterable %}
{{ navig }}
<table id="wrds" class="listing">
<tr>
<th>Word:</th>
<th>Description:</th>
<th>Right:</th>
<th>Wrong:</th>
<th>Status:</th>
<th></th>
<th></th>
<th></th>
</tr>
{% for w in words %}
<tr class="{{ loop.cycle('', 'alt') }}">
<td>
{{ w.word }}
</td>
<td>
{{ w.desc }}
</td>
<td class="aright">{{ w.good }}</td>
<td class="aright">{{ w.bad }}</td>
<td class="acenter">{{ w.status }}</td>
<td class="acenter">
<a href="/editword?tsid={{ tsid}}&wid={{ w.id }}">Edit</a>
</td>
<td class="acenter">
<a href="/editword?tsid={{ tsid}}&wid={{ w.id }}&reset=1">Reset</a>
</td>
<td class="acenter">
<a href="/delword?tsid={{ tsid}}&wid={{ w.id }}">Delete</a>
</td>
</tr>
{% endfor %}
</table>
{{ navig }}
{% else %}
<p>
This set does not contain any words. You can add some using the
form below.
</p>
{% endif %}
<hr>
<form name="addform" action="/addword" method="post">
<input name="tsid" type="hidden" value="{{ tsid }}">
<table>
<tr>
<td>Word:</td>
<td>Description</td>
</tr>
<tr>
<td>
<input name="word" type="text" size="30"
onkeypress="return spanish_letters(event)" value="">
</td>
<td>
<textarea name="desc" rows="3" cols="50"></textarea>
</td>
<td>
<input type="submit" value="Add a new word">
</td>
</tr>
</table>
</form>
{% endblock %}