Blame view

dictionary/templates/manage_classifications.html 2.07 KB
janek37 authored
1
2
3
4
{% extends "base.html" %}
{% load dictionary_extras %}

{% block extrahead %}
janek37 authored
5
6
7
8
    <link rel="stylesheet" type="text/css"
          href="{{ MEDIA_URL }}css/manage_classifications.css"/>
    <script type="text/javascript"
            src="{{ MEDIA_URL }}js/manage-classifications.js"></script>
janek37 authored
9
10
11
12
13
{% endblock %}

{% block title %}Klasyfikacje{% endblock %}

{% block content %}
janek37 authored
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
    <form action="" method="post" class="add-classification">
        {% csrf_token %}
        {{ add_form.as_p }}
        <p>
            <button type="submit">Dodaj klasyfikację</button>
        </p>
    </form>
    {% for classification, value_form, vocab_form, using in classification_forms %}
        <div class="classification">
            <div class="classification-controls">
                <form action="" method="post" class="add-value">
                    {% csrf_token %}
                    {{ value_form.as_p }}
                    <p>
                        <button type="submit">Dodaj wartość</button>
                    </p>
                </form>
                <div class="vocabs">
                    <p>Używające słowniki:</p>
                    {% if using %}
                        <ul>
                            {% for vocab in using %}
                                <li>{{ vocab.id }}</li>
                            {% endfor %}
                        </ul>
                    {% else %}
                        <p>brak</p>
                    {% endif %}
                    <form action="" method="post">
                        {% csrf_token %}
                        {{ vocab_form.as_p }}
                        <p>
                            <button type="submit">Dodaj słownik</button>
                        </p>
                    </form>
                </div>
            </div>
            <h4>{{ classification.name }}</h4>

            <p>Wartości:</p>
            {% with tree=classification.value_tree %}
                {% if tree %}
                    {% value_tree tree %}
                {% endif %}
            {% endwith %}
janek37 authored
59
        </div>
janek37 authored
60
    {% endfor %}
janek37 authored
61
{% endblock %}