manager_view.html
1.82 KB
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
{% extends "base.html" %}
{% block extrahead %}
<script type="text/javascript" src="{{ MEDIA_URL }}js/manager-view.js"></script>
{% endblock %}
{% block title %}Słowniki{% endblock %}
{% block content %}
<h3>Zarządzane słowniki</h3>
<p>
<select id="vocabulary-select" size="10">
{% for vocab in vocabularies %}
<option value="{{ vocab.pk }}">{{ vocab.id }}</option>
{% endfor %}
</select>
</p>
<p>
<input type="text" id="new-vocabulary"/>
<button id="add-vocabulary">
dodaj słownik
</button>
</p>
<h3>Użytkownicy</h3>
<table id="user-privileges">
<tr>
<th>Nazwa</th>
<th>ogląda</th>
<th>modyfikuje</th>
<th>zarządza</th>
</tr>
{% for u in users %}
<tr>
<td>{{ u.username }}</td>
<td>
{% if u.usersettings.views_lexeme %}
<input
type="checkbox"
id="view-{{ u.pk }}"
class="checkbox-view"
{% if u.usersettings.views_all_lexemes %}disabled="disabled"{% endif %}/>
{% else %}
<input type="checkbox" disabled="disabled"/>
{% endif %}
</td>
<td>
{% if u.usersettings.changes_lexeme %}
<input type="checkbox" id="change-{{ u.pk }}" class="checkbox-change"/>
{% else %}
<input type="checkbox" disabled="disabled"/>
{% endif %}
</td>
<td>
{% if u.usersettings.manages_vocabulary %}
<input
type="checkbox"
id="manage-{{ u.pk }}"
class="checkbox-manage"
{% if u == user %}disabled="disabled"{% endif %}/>
{% else %}
<input type="checkbox" disabled="disabled"/>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% endblock %}