<commit_before>{% load i18n %}
{% load tags %}

<div class="subnav subnav-fixed">
    <ul class="nav nav-pills">
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {% trans "View" %}
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                {% if is_producer or is_retailer %}
                    <li>
                        <a href="{% url user_page_commercial_products request.user %}">
                            <i class="icon-barcode"></i>
                            {% trans "Commercial products" %}
                        </a>
                    </li>
                {% endif %}

                <li>
                    <a href="{% url user_page user %}">
                        <i class="icon-picture"></i>
                        {% trans "Gallery" %}
                    </a>
                </li>
                <li>
                    <a href="{% url user_page_favorites user %}">
                        <i class="icon-heart"></i>
                        {% trans "Favorites" %}
                    </a>
                </li>
                <li>
                    <a href="{% url user_page_card user %}">
                        <i class="icon-list-alt"></i>
                        {% trans "Technical card" %}
                    </a>
                </li>
                <li>
                    <a href="{% url user_page_plots user %}">
                        <i class="icon-align-left"></i>
                        {% trans "Plots" %}
                    </a>
                </li>

                {% ifequal user request.user %}
                <li class="divider"></li>
                <li>
                    <a href="{% url me %}">
                        <i class="icon-bullhorn"></i>
                        {% trans "Public Area" %}
                    </a>
                </li>
                <li>
                    <a href="{% url me %}?staging">
                        <i class="icon-lock"></i>
                        {% trans "Staging Area" %}
                    </a>
                </li>
                <li class="divider"></li>
                <li>
                    <a href="{% url user_page_api_keys user %}">
                        <i class="icon-list"></i>
                        {% trans "API Keys" %}
                    </a>
                </li>
                {% endifequal %}
            </ul>
        </li>

        {% if request.user != user and request.user.is_authenticated %}
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {% trans "User" %}
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                <li>
                    <a class="{% if follows %}unfollow{% else %}follow{% endif %}"
                       href="{% if follows %}{% url unfollow user %}{% else %}{% url follow user %}{% endif %}{% query_string "next=request.path" "plate_solving_started" %}">
                        {% if follows %}
                            <i class="icon-eye-close"></i>
                            {% trans "Stop following" %}
                        {% else %}
                            <i class="icon-eye-open"></i>
                            {% trans "Follow" %}
                        {% endif %}
                    </a>
                </li>
                <li>
                    <a class="send-private-message" href="{% url messages_compose_to user %}{% query_string "next=request.path" "" %}">
                        <i class="icon-envelope"></i>
                        {% trans "Send private message" %}
                    </a>
                </li>
            </ul> 
        </li>
        {% endif %}

        <li class="dropdown" style="visibility: {% in_gallery request %}">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {% trans "Sort" %}
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                <li><a href="?public&sub=uploaded">
                    <i class="icon-upload"></i>
                    {% trans "Upload time" %}</a></li>
                <li><a href="?public&sub=acquired">
                    <i class="icon-time"></i>
                    {% trans "Acquisition time" %}</a></li>
                <li><a href="?public&sub=subject">
                    <i class="icon-tags"></i>
                    {% trans "Subject type" %}</a></li>
                <li><a href="?public&sub=year">
                    <i class="icon-calendar"></i>
                    {% trans "Year" %}</a></li>
                <li><a href="?public&sub=gear">
                    <i class="icon-cog"></i>
                    {% trans "Gear" %}</a></li>
                <li class="divider"></li>
                <li><a href="?public&sub=nodata">
                    <i class="icon-warning-sign"></i>
                    {% trans "Lacking data" %}</a></li>
            </ul>
        </li>
    </ul>
</div>


<commit_msg>Fixed Commercial menu entry in profile nav.<commit_after>{% load i18n %}
{% load tags %}

<div class="subnav subnav-fixed">
    <ul class="nav nav-pills">
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {% trans "View" %}
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                {% ifequal request.user user %}
                    {% if is_producer or is_retailer %}
                        <li>
                            <a href="{% url user_page_commercial_products request.user %}">
                                <i class="icon-barcode"></i>
                                {% trans "Commercial products" %}
                            </a>
                        </li>
                    {% endif %}
                {% endifequal %}
                <li>
                    <a href="{% url user_page user %}">
                        <i class="icon-picture"></i>
                        {% trans "Gallery" %}
                    </a>
                </li>
                <li>
                    <a href="{% url user_page_favorites user %}">
                        <i class="icon-heart"></i>
                        {% trans "Favorites" %}
                    </a>
                </li>
                <li>
                    <a href="{% url user_page_card user %}">
                        <i class="icon-list-alt"></i>
                        {% trans "Technical card" %}
                    </a>
                </li>
                <li>
                    <a href="{% url user_page_plots user %}">
                        <i class="icon-align-left"></i>
                        {% trans "Plots" %}
                    </a>
                </li>

                {% ifequal user request.user %}
                <li class="divider"></li>
                <li>
                    <a href="{% url me %}">
                        <i class="icon-bullhorn"></i>
                        {% trans "Public Area" %}
                    </a>
                </li>
                <li>
                    <a href="{% url me %}?staging">
                        <i class="icon-lock"></i>
                        {% trans "Staging Area" %}
                    </a>
                </li>
                <li class="divider"></li>
                <li>
                    <a href="{% url user_page_api_keys user %}">
                        <i class="icon-list"></i>
                        {% trans "API Keys" %}
                    </a>
                </li>
                {% endifequal %}
            </ul>
        </li>

        {% if request.user != user and request.user.is_authenticated %}
        <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {% trans "User" %}
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                <li>
                    <a class="{% if follows %}unfollow{% else %}follow{% endif %}"
                       href="{% if follows %}{% url unfollow user %}{% else %}{% url follow user %}{% endif %}{% query_string "next=request.path" "plate_solving_started" %}">
                        {% if follows %}
                            <i class="icon-eye-close"></i>
                            {% trans "Stop following" %}
                        {% else %}
                            <i class="icon-eye-open"></i>
                            {% trans "Follow" %}
                        {% endif %}
                    </a>
                </li>
                <li>
                    <a class="send-private-message" href="{% url messages_compose_to user %}{% query_string "next=request.path" "" %}">
                        <i class="icon-envelope"></i>
                        {% trans "Send private message" %}
                    </a>
                </li>
            </ul> 
        </li>
        {% endif %}

        <li class="dropdown" style="visibility: {% in_gallery request %}">
            <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                {% trans "Sort" %}
                <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
                <li><a href="?public&sub=uploaded">
                    <i class="icon-upload"></i>
                    {% trans "Upload time" %}</a></li>
                <li><a href="?public&sub=acquired">
                    <i class="icon-time"></i>
                    {% trans "Acquisition time" %}</a></li>
                <li><a href="?public&sub=subject">
                    <i class="icon-tags"></i>
                    {% trans "Subject type" %}</a></li>
                <li><a href="?public&sub=year">
                    <i class="icon-calendar"></i>
                    {% trans "Year" %}</a></li>
                <li><a href="?public&sub=gear">
                    <i class="icon-cog"></i>
                    {% trans "Gear" %}</a></li>
                <li class="divider"></li>
                <li><a href="?public&sub=nodata">
                    <i class="icon-warning-sign"></i>
                    {% trans "Lacking data" %}</a></li>
            </ul>
        </li>
    </ul>
</div>



{'fraction_non_alphanumeric': 0.16021464162514373, 'fraction_numerical': 0.0003832886163280951, 'mean_word_length': 0.9640572073767407, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 267, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '516950', 'n_tokens_mistral': 2993, 'n_tokens_neox': 2582, 'n_words': 576}