Blame view

dictionary/templates/classification_value_tree.html 1.11 KB
janek37 authored
1
2
{% load dictionary_extras %}
<ul class="value-tree">
janek37 authored
3
4
    {% for value, subtree in value_tree %}
        <li>
janek37 authored
5
6
7
8
9
      <span class="value-name">
        {{ value.label }}
      </span>
      <span class="value-controls">
        {% if value.is_empty and not subtree %}
janek37 authored
10
11
12
13
14
15
16
17
18
            <form action="" method="post">
                {% csrf_token %}
                <input type="hidden" name="det" value="value_remove"/>
                <input type="hidden" name="id" value="{{ value.pk }}"/>
                <button type="submit">
                    usuń
                </button>
            </form>
        {% endif %}
janek37 authored
19
          <form action="" method="post">
janek37 authored
20
21
22
23
24
25
26
              {% csrf_token %}
              <input type="hidden" name="det" value="value_rename"/>
              <input type="hidden" name="id" value="{{ value.pk }}"/>
              <input type="text" name="new_name"/>
              <button type="submit">
                  zmień nazwę
              </button>
janek37 authored
27
28
          </form>
      </span>
janek37 authored
29
30
31
32
33
            {% if subtree %}
                {% value_tree subtree %}
            {% endif %}
        </li>
    {% endfor %}
janek37 authored
34
</ul>