/
select_tags.html
27 lines (27 loc) · 1.05 KB
/
select_tags.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
<div class="tag-selector-container">
{% for tag in tags %}
<div class="tag-{{ tag.key }}" {% if tag.hidden %} style="display:none;" {% endif %}>
<ul class="nav nav-pills nav-fill tag-selector">
{% for value in tag.values %}
<li class="nav-item" style="padding:10px"
data-tag-{{ tag.key }}="{{ value.value }}"
data-children-keys="{% for child in value.children %} {{ child.key }} {% endfor %}">
<a {% if value.tooltip != None %} data-toggle="tooltip"{% endif %}
data-placement="bottom"
title="{{ value.tooltip }}"
class="nav-link {% if value.active %} active {% endif %}"
href="#">{{ value.title }}
</a>
</li>
{% endfor %}
</ul>
{% comment %}
The children tags are placed inside a div common with its parent
so that they will be hidden if the parent is hidden
{% endcomment %}
{% for value in tag.values %}
{% include "comp/select_tags.html" with tags=value.children %}
{% endfor %}
</div>
{% endfor %}
</div>