Blame view

dictionary/templates/manage_qualifiers.html 2.72 KB
janek37 authored
1
2
3
{% extends "base.html" %}

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

{% block title %}Kwalifikatory{% endblock %}

{% block content %}
janek37 authored
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
    <div id="vocab-accordion">
        {% for vocab_name, add_exclusion_class_form, remove_exclusion_class_form, add_qualifier_form, qualifier_forms in form_list %}
            <h3><a href="#">{{ vocab_name }}</a></h3>
            <div>
                <form action="" method="post">
                    {% csrf_token %}
                    {{ add_exclusion_class_form.as_table }}
                    <button type="submit">
                        dodaj klasę wykluczania
                    </button>
                </form>
                {% if remove_exclusion_class_form %}
                    <form action="" method="post">
                        {% csrf_token %}
                        {{ remove_exclusion_class_form.as_table }}
                        <button type="submit">
                            usuń klasę wykluczania
                        </button>
                    </form>
                {% endif %}
                <form action="" method="post">
                    {% csrf_token %}
                    {{ add_qualifier_form.as_table }}
                    <button type="submit">
                        dodaj kwalifikator
                    </button>
                </form>
                <ul>
                    {% for qualifier, form in qualifier_forms %}
                        <li>
janek37 authored
43
44
45
46
47
              <span class="qualifier-label">
                {{ qualifier.label }}
              </span>
              <span class="qualifier-controls">
                {% if qualifier.is_empty %}
janek37 authored
48
49
50
51
52
53
54
55
56
57
58
                    <form action="" method="post">
                        {% csrf_token %}
                        <input type="hidden" name="det"
                               value="remove_qualifier"/>
                        <input type="hidden" name="id"
                               value="{{ qualifier.pk }}"/>
                        <button type="submit">
                            usuń
                        </button>
                    </form>
                {% endif %}
janek37 authored
59
                  <form action="" method="post">
janek37 authored
60
61
62
63
64
                      {% csrf_token %}
                      {{ form.as_table }}
                      <button type="submit">
                          zmień
                      </button>
janek37 authored
65
66
                  </form>
              </span>
janek37 authored
67
68
69
70
71
72
                        </li>
                    {% endfor %}
                </ul>
            </div>
        {% endfor %}
    </div>
janek37 authored
73
{% endblock %}