<commit_before>{% import "account/_helpers.html" as helper %}

{% macro render_admin_user(user) %}
<tr>
    <td>{{user.name}}</td>
    <td class="hidden-xs">{{user.fullname}}</td>
    <td class="hidden-xs text-center">{{user.created[8:10]}}-{{user.created[5:7]}}-{{user.created[0:4]}}</td>

    {% if user.admin %}
    <td class="text-center">
        {% if user.id != 1 %}
        <a href="{{url_for('admin.del_admin', user_id=user.id)}}" class="btn btn-inverse">
            <i class="fa fa-remove"></i>  Revoke admin rights
        </a>
        {% else %}
        N/A
        {% endif %}
    </td>
    {% else %}
    <td class="text-center">
        <a href="{{url_for('admin.add_admin', user_id=user.id)}}" class="btn btn-inverse">
            <i class="fa fa-plus"></i> Grant admin rights
        </a>
    </td>
    {% endif %}
</tr>
{% endmacro %}

{% macro render_admin_local_nav(current_user, active_link, active_project) %}
<ul data-spy="affix" data-offset-top="200px" class="nav nav-list bs-docs-sidenav affix">
    {% if current_user.admin %}
    <li class="nav-link"><a href="{{url_for('admin.index')}}">Dashboard</a></li>
    <li class="nav-link"><a href="{{url_for('admin.featured')}}">Featured</a></li>
    <li class="nav-link"><a href="{{url_for('admin.categories')}}">Categories</a></li>
    <li class="nav-link"><a href="{{url_for('admin.users')}}">Administrators</a></li>
    <li class="nav-link"><a href="{{url_for('admin.export_users', format='csv')}}">Export Users</a></li>
    <li class="nav-link"><a href="{{url_for('rq_dashboard.overview')}}">Background Jobs</a></li>
    {% endif %}
</ul>
{% endmacro %}
<commit_msg>Add active links to admin nav<commit_after>{% import "account/_helpers.html" as helper %}

{% macro render_admin_user(user) %}
<tr>
    <td>{{user.name}}</td>
    <td class="hidden-xs">{{user.fullname}}</td>
    <td class="hidden-xs text-center">{{user.created[8:10]}}-{{user.created[5:7]}}-{{user.created[0:4]}}</td>

    {% if user.admin %}
    <td class="text-center">
        {% if user.id != 1 %}
        <a href="{{url_for('admin.del_admin', user_id=user.id)}}" class="btn btn-inverse">
            <i class="fa fa-remove"></i>  Revoke admin rights
        </a>
        {% else %}
        N/A
        {% endif %}
    </td>
    {% else %}
    <td class="text-center">
        <a href="{{url_for('admin.add_admin', user_id=user.id)}}" class="btn btn-inverse">
            <i class="fa fa-plus"></i> Grant admin rights
        </a>
    </td>
    {% endif %}
</tr>
{% endmacro %}

{% macro render_admin_local_nav(current_user, active_link) %}
<ul data-spy="affix" data-offset-top="200px" class="nav nav-list bs-docs-sidenav affix">
    {% if current_user.admin %}
    <li class="nav-link{% if active_link == "dashboard" %} active{% endif%}"><a href="{{url_for('admin.index')}}">Dashboard</a></li>
    <li class="nav-link{% if active_link == "featured" %} active{% endif%}"><a href="{{url_for('admin.featured')}}">Featured</a></li>
    <li class="nav-link{% if active_link == "categories" %} active{% endif%}"><a href="{{url_for('admin.categories')}}">Categories</a></li>
    <li class="nav-link{% if active_link == "administrators" %} active{% endif%}"><a href="{{url_for('admin.users')}}">Administrators</a></li>
    <li class="nav-link"><a href="{{url_for('admin.export_users', format='csv')}}">Export Users</a></li>
    <li class="nav-link"><a href="{{url_for('rq_dashboard.overview')}}">Background Jobs</a></li>
    {% endif %}
</ul>
{% endmacro %}

{'fraction_non_alphanumeric': 0.2422076065198742, 'fraction_numerical': 0.0062911066628538745, 'mean_word_length': 3.772169167803547, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 95, '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': '98651', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1220, 'n_words': 210}