<commit_before>{% load url from future %}
{% load i18n %}

<div id="top_page" class="navbar navbar-static-top accounts">
    <div class="navbar-inner">

        {# This is used in mobile view #}
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".account-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>

        <div class="nav-collapse account-collapse collapse">
            <div class="container-fluid">
                {% if LANGUAGES|length > 1 %}
                    <form id="language_selector" class="pull-left navbar-form" action="/i18n/setlang/" method="post">
                        {% csrf_token %}
                        <select name="language">
                            {% for language in LANGUAGES %}
                            <option value="{{ language.0 }}" {% if LANGUAGE_CODE == language.0 %}selected="selected"{% endif %}>{{ language.1 }}</option>
                            {% endfor %}
                        </select>
                        <button class="btn" type="submit">{% trans "Go" %}</button>
                    </form>
                {% endif %}
                <ul class="nav pull-right">
                    {% if user.is_authenticated %}
                        <li>
                            {% if num_unread_notifications > 0 %}
                                {# If user has new notifications - we change account link to go to inbox #}
                                <a href="{% url 'customer:notifications-inbox' %}">
                                    <i class="icon-user"></i>
                                    {% trans "Account" %}
                                    <span class="label label-important">{{ num_unread_notifications }}</span>
                                </a>
                            {% else %}
                                <a href="{% url 'customer:summary' %}"><i class="icon-user"></i> {% trans "Account" %}</a>
                            {% endif %}</a>
                        </li>
                        {% if user.is_staff %}
                            <li class="hidden-phone"><a href="{% url 'dashboard:index' %}"><i class="icon-list-ul"></i> {% trans "Dashboard" %}</a></li>
                        {% endif %}
                        <li><a href="{% url 'customer:logout' %}"><i class="icon-signout"></i> {% trans "Logout" %}</a></li>
                    {% else %}
                        <li><a href="{% url 'customer:login' %}"><i class="icon-signin"></i> {% trans "Login or register" %}</a></li>
                    {% endif %}
                </ul>
            </div>
        </div>

    </div>
</div>
<commit_msg>Also how dashboard link when user has dashboard_access permission<commit_after>{% load url from future %}
{% load i18n %}

<div id="top_page" class="navbar navbar-static-top accounts">
    <div class="navbar-inner">

        {# This is used in mobile view #}
        <a class="btn btn-navbar" data-toggle="collapse" data-target=".account-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>

        <div class="nav-collapse account-collapse collapse">
            <div class="container-fluid">
                {% if LANGUAGES|length > 1 %}
                    <form id="language_selector" class="pull-left navbar-form" action="/i18n/setlang/" method="post">
                        {% csrf_token %}
                        <select name="language">
                            {% for language in LANGUAGES %}
                            <option value="{{ language.0 }}" {% if LANGUAGE_CODE == language.0 %}selected="selected"{% endif %}>{{ language.1 }}</option>
                            {% endfor %}
                        </select>
                        <button class="btn" type="submit">{% trans "Go" %}</button>
                    </form>
                {% endif %}
                <ul class="nav pull-right">
                    {% if user.is_authenticated %}
                        <li>
                            {% if num_unread_notifications > 0 %}
                                {# If user has new notifications - we change account link to go to inbox #}
                                <a href="{% url 'customer:notifications-inbox' %}">
                                    <i class="icon-user"></i>
                                    {% trans "Account" %}
                                    <span class="label label-important">{{ num_unread_notifications }}</span>
                                </a>
                            {% else %}
                                <a href="{% url 'customer:summary' %}"><i class="icon-user"></i> {% trans "Account" %}</a>
                            {% endif %}</a>
                        </li>
                        {% if user.is_staff or perms.partner.dashboard_access %}
                            <li class="hidden-phone"><a href="{% url 'dashboard:index' %}"><i class="icon-list-ul"></i> {% trans "Dashboard" %}</a></li>
                        {% endif %}
                        <li><a href="{% url 'customer:logout' %}"><i class="icon-signout"></i> {% trans "Logout" %}</a></li>
                    {% else %}
                        <li><a href="{% url 'customer:login' %}"><i class="icon-signin"></i> {% trans "Login or register" %}</a></li>
                    {% endif %}
                </ul>
            </div>
        </div>

    </div>
</div>

{'fraction_non_alphanumeric': 0.15966989594546108, 'fraction_numerical': 0.0032292787944025836, 'mean_word_length': 1.2708757637474541, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 121, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3131184', 'n_tokens_mistral': 1570, 'n_tokens_neox': 1381, 'n_words': 336}