<commit_before>{% extends "dataedit/base.html" %}


{% block main-right-sidebar-filter %}

<h3>Filters</h3>
<form action="{{ request.path }}" method="get">
    <div class="searchbox_container small">
        <input type="text" name="query" placeholder="Search" value="{% firstof query "" %}" class="form-control" />
    </div>
    <hr>
    {% load dataedit.taghandler %}
    {% get_tags None None None as all_tags %}
    <div class="foldable-entry">
        <h5>Tags</h5>
        <span class="fa fa-caret-up" data-toggle="collapse" data-target="#tags"></span>
        <div id="tags" class="collapse show foldable-entry-body">
            <div style="display: flex; flex-flow: wrap; margin-bottom: 1em;">
                {% for t in all_tags %}
                    <label class="tag-checkbox-container {% if t.id in tags %} tag-checkbox-checked {% endif %}" style="background:{{ t.color }};color:{% readable_text_color t.color %}">
                        <input {% if t.id in tags %} checked="checked" {% endif %} type="checkbox" class="tag-checkbox" name="tags" value="{{ t.id }}">
                        <span>{{ t.name }}</span>
                        <span class="tag-checkbox-icon fas fa-check"></span>
                    </label>
                {% endfor %}
            </div>
            <button type="submit" class="btn btn-success">
                Apply Filters
            </button>
            <a class="btn btn-danger" href="{{ request.path }}" >
                Reset Filters
            </a>
        </div>
    </div>
</form>

{% endblock main-right-sidebar-filter %}<commit_msg>Add information on how to work with tags and filter to the sidebar, the user can access the add tags function from dataview/schema, add basic frontend<commit_after>{% extends "dataedit/base.html" %}


{% block main-right-sidebar-filter %}

<h3>Filters</h3>
<form action="{{ request.path }}" method="get">
    <div class="searchbox_container small">
        <input type="text" name="query" placeholder="Search" value="{% firstof query "" %}" class="form-control" />
    </div>
    <hr>
    {% load dataedit.taghandler %}
    {% get_tags None None None as all_tags %}
    <div class="foldable-entry">
        <h5>Tags</h5>
        <span class="fa fa-caret-up" data-toggle="collapse" data-target="#tags"></span>
        <div id="tags" class="collapse show foldable-entry-body">
            <div style="display: flex; flex-flow: wrap; margin-bottom: 1em;">
                {% for t in all_tags %}
                    <label class="tag-checkbox-container {% if t.id in tags %} tag-checkbox-checked {% endif %}" style="background:{{ t.color }};color:{% readable_text_color t.color %}">
                        <input {% if t.id in tags %} checked="checked" {% endif %} type="checkbox" class="tag-checkbox" name="tags" value="{{ t.id }}">
                        <span>{{ t.name }}</span>
                        <span class="tag-checkbox-icon fas fa-check"></span>
                    </label>
                {% endfor %}
            </div>
            <button type="submit" class="btn btn-success">
                Apply Filters
            </button>
            <a class="btn btn-danger" href="{{ request.path }}" >
                Reset Filters
            </a>
        </div>
    </div>
    <div class="foldable-entry">
        <h5>How to work with Tags and Filter</h6>
        <span class="fa fa-caret-up" data-toggle="collapse" data-target="#howto"></span>
        <div id="howto" class="collapse show foldable-entry-body">
        
        <ul class="list-group">
            <p class="font-weight-bold">Add tags to a table:</p> <li class="list-group-item">Tags can be added when viewing a table.</li>
            <p class="font-weight-bold">Create new Tags:</p> <li class="list-group-item">You can create <a href="/dataedit/tags">new tags</a>.</li>
            <p class="font-weight-bold">Find data resources:</p> <li class="list-group-item"> Use the filter on tags or try searching for strings that occur in table names.</li>
        </ul>
    </div>

</form>



{% endblock main-right-sidebar-filter %}
{'fraction_non_alphanumeric': 0.16784409257003655, 'fraction_numerical': 0.00292326431181486, 'mean_word_length': 2.292702485966319, 'pattern_counts': {'":': 0, '<': 84, '<?xml version=': 0, '>': 84, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917599', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1181, 'n_words': 315}