<commit_before>{% load static from staticfiles %}
{% load securitytags %}
{% load i18n %}

{% is_editor as editor %}

<div class="off-canvas position-left reveal-for-large" id="offCanvas" data-off-canvas>
    <button class="close-button" aria-label="Close menu" type="button" data-close>
        <span aria-hidden="true">&times;</span>
    </button>
    <ul class="vertical menu">
        <li class="title"><a href="#"><i class="fa fa-chevron-circle-down action-icon">&nbsp;</i> Janeway</a></li>
        <li class="subtitle"><a href="#">Dashboard</a></li>
        <li><a href="{% url 'core_dashboard' %}"><i class="fa fa-tachometer">&nbsp;</i>
            Main</a></li>
        {% if editor %}
        <li><a href="{% url 'kanban' %}"><i class="fa fa-sticky-note">&nbsp;</i> Kanban</a>
        </li>
        <li class="subtitle"><a href="#">Workflow</a></li>
        <li><a href="{% url 'review_home' %}"><i class="fa fa-check">&nbsp;</i> Review</a>
        </li>
        <li><a href="{% url 'copyediting' %}"><i class="fa fa-pencil">&nbsp;</i> Editing</a>
        </li>
        <li><a href="{% url 'production_list' %}"><i class="fa fa-bookmark">&nbsp;</i>
            Production</a></li>
        <li><a href="{% url 'proofing_list' %}"><i class="fa fa-search">&nbsp;</i>
            Proofing</a></li>
        <li><a href="{% url 'publish' %}"><i class="fa fa-archive">&nbsp;</i>
            Pre Publication</a></li>
        <li class="subtitle"><a href="#">Back Content</a></li>
        <li><a href="{% url 'manage_issues' %}"><i class="fa fa-folder-open">&nbsp;</i>
            Issues</a></li>
        <li><a href="{% url 'manage_archive' %}"><i class="fa fa-file">&nbsp;</i>
            Articles</a></li>
        {% endif %}
        {% if request.user.is_staff %}
            <li class="subtitle"><a href="#">Staff</a></li>
            <li><a href="{% url 'core_manager_index' %}"><i class="fa fa-lock">&nbsp;</i>
            Manager</a></li>
            <li><a href="{% url 'core_plugin_list' %}"><i class="fa fa-plug">&nbsp;</i>
            Plugins</a></li>
            <li><a href="{% url 'core_journal_workflow' %}"><i class="fa fa-code-fork">&nbsp;</i>
            Workflow</a></li>
        {% endif %}
        {% if journal_settings.general.switch_language %}
        <li class="subtitle"><a href="#">Language</a></li>
        <li>
            <div class="small-12 small-centered columns">
                 <form action="{% url 'set_language' %}" method="post">{% csrf_token %}
                    <input name="next" type="hidden" value="{{ request.PATH }}" />
                    <select name="language" onchange="this.form.submit()">
                        {% get_current_language as LANGUAGE_CODE %}
                        {% get_available_languages as LANGUAGES %}
                        {% get_language_info_list for LANGUAGES as languages %}
                        {% for language in languages %}
                            <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
                                {{ language.name_local }} ({{ language.code }})
                            </option>
                        {% endfor %}
                    </select>
                </form>
            </div>
        </li>
        {% endif %}
    </ul>
</div>

<div class="off-canvas-content" data-off-canvas-content>

    <header class="main-header" role="banner">
        <div class="row expanded">
            <div class="small-3 columns">
                <button type="button" class="button hide-for-large" data-toggle="offCanvas"><img
                        src="{% static "admin/img/icons/menu-toggle.svg" %}" alt="Menu"> Menu
                </button>
                &nbsp;
            </div>
            <div class="small-6 columns text-center show-for-large">
                <h1><a href="/">{{ request.journal.name }}</a></h1>
            </div>
            <div class="small-6 columns text-center show-for-medium-only">
                <h1><a href="/">{{ request.journal.name }}</a></h1>
            </div>
            <div class="small-6 columns text-center show-for-small-only">
                <h1><a href="/">{{ request.journal.code }}</a></h1>
            </div>
            <div class="small-3 columns text-right">
                {% if request.user.is_authenticated %}
                <div class="profile">
                    <a class="float-right" data-toggle="profile-dropdown">
                        <p class="show-for-medium">Hello, {{ request.user.first_name }}!</p>
                        {% include "elements/avatar.html" with user=request.user tooltip="off" %}
                    </a>
                </div>
                <div class="dropdown-pane bottom" id="profile-dropdown" data-dropdown data-close-on-click="true">
                    <ul class="menu vertical">
                        <li><a href="{% url 'submission_start' %}">Submit</a></li>
                        <li><a href="{% url 'core_edit_profile' %}">Profile</a></li>
                        <li><a href="{% url 'core_manager_index' %}">Manager</a></li>
                        <li><a href="/admin/">Admin</a></li>
                        <li><a href="{% url 'core_logout' %}">Logout</a></li>
                    </ul>
                </div>
                {% endif %}
            </div>
        </div><commit_msg>Added checks for admin nav dropdown. Fixes #20.<commit_after>{% load static from staticfiles %}
{% load securitytags %}
{% load i18n %}

{% is_editor as editor %}

<div class="off-canvas position-left reveal-for-large" id="offCanvas" data-off-canvas>
    <button class="close-button" aria-label="Close menu" type="button" data-close>
        <span aria-hidden="true">&times;</span>
    </button>
    <ul class="vertical menu">
        <li class="title"><a href="#"><i class="fa fa-chevron-circle-down action-icon">&nbsp;</i> Janeway</a></li>
        <li class="subtitle"><a href="#">Dashboard</a></li>
        <li><a href="{% url 'core_dashboard' %}"><i class="fa fa-tachometer">&nbsp;</i>
            Main</a></li>
        {% if editor %}
        <li><a href="{% url 'kanban' %}"><i class="fa fa-sticky-note">&nbsp;</i> Kanban</a>
        </li>
        <li class="subtitle"><a href="#">Workflow</a></li>
        <li><a href="{% url 'review_home' %}"><i class="fa fa-check">&nbsp;</i> Review</a>
        </li>
        <li><a href="{% url 'copyediting' %}"><i class="fa fa-pencil">&nbsp;</i> Editing</a>
        </li>
        <li><a href="{% url 'production_list' %}"><i class="fa fa-bookmark">&nbsp;</i>
            Production</a></li>
        <li><a href="{% url 'proofing_list' %}"><i class="fa fa-search">&nbsp;</i>
            Proofing</a></li>
        <li><a href="{% url 'publish' %}"><i class="fa fa-archive">&nbsp;</i>
            Pre Publication</a></li>
        <li class="subtitle"><a href="#">Back Content</a></li>
        <li><a href="{% url 'manage_issues' %}"><i class="fa fa-folder-open">&nbsp;</i>
            Issues</a></li>
        <li><a href="{% url 'manage_archive' %}"><i class="fa fa-file">&nbsp;</i>
            Articles</a></li>
        {% endif %}
        {% if request.user.is_staff %}
            <li class="subtitle"><a href="#">Staff</a></li>
            <li><a href="{% url 'core_manager_index' %}"><i class="fa fa-lock">&nbsp;</i>
            Manager</a></li>
            <li><a href="{% url 'core_plugin_list' %}"><i class="fa fa-plug">&nbsp;</i>
            Plugins</a></li>
            <li><a href="{% url 'core_journal_workflow' %}"><i class="fa fa-code-fork">&nbsp;</i>
            Workflow</a></li>
        {% endif %}
        {% if journal_settings.general.switch_language %}
        <li class="subtitle"><a href="#">Language</a></li>
        <li>
            <div class="small-12 small-centered columns">
                 <form action="{% url 'set_language' %}" method="post">{% csrf_token %}
                    <input name="next" type="hidden" value="{{ request.PATH }}" />
                    <select name="language" onchange="this.form.submit()">
                        {% get_current_language as LANGUAGE_CODE %}
                        {% get_available_languages as LANGUAGES %}
                        {% get_language_info_list for LANGUAGES as languages %}
                        {% for language in languages %}
                            <option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected{% endif %}>
                                {{ language.name_local }} ({{ language.code }})
                            </option>
                        {% endfor %}
                    </select>
                </form>
            </div>
        </li>
        {% endif %}
    </ul>
</div>

<div class="off-canvas-content" data-off-canvas-content>

    <header class="main-header" role="banner">
        <div class="row expanded">
            <div class="small-3 columns">
                <button type="button" class="button hide-for-large" data-toggle="offCanvas"><img
                        src="{% static "admin/img/icons/menu-toggle.svg" %}" alt="Menu"> Menu
                </button>
                &nbsp;
            </div>
            <div class="small-6 columns text-center show-for-large">
                <h1><a href="/">{{ request.journal.name }}</a></h1>
            </div>
            <div class="small-6 columns text-center show-for-medium-only">
                <h1><a href="/">{{ request.journal.name }}</a></h1>
            </div>
            <div class="small-6 columns text-center show-for-small-only">
                <h1><a href="/">{{ request.journal.code }}</a></h1>
            </div>
            <div class="small-3 columns text-right">
                {% if request.user.is_authenticated %}
                <div class="profile">
                    <a class="float-right" data-toggle="profile-dropdown">
                        <p class="show-for-medium">Hello, {{ request.user.first_name }}!</p>
                        {% include "elements/avatar.html" with user=request.user tooltip="off" %}
                    </a>
                </div>
                <div class="dropdown-pane bottom" id="profile-dropdown" data-dropdown data-close-on-click="true">
                    <ul class="menu vertical">
                        <li><a href="{% url 'submission_start' %}">Submit</a></li>
                        <li><a href="{% url 'core_edit_profile' %}">Profile</a></li>
                        {% if request.user.is_staff or editor %}
                        <li><a href="{% url 'core_manager_index' %}">Manager</a></li>
                        {% endif %}
                        {% if request.user.is_staff %}
                        <li><a href="/admin/">Admin</a></li>
                        {% endif %}
                        <li><a href="{% url 'core_logout' %}">Logout</a></li>
                    </ul>
                </div>
                {% endif %}
            </div>
        </div>
{'fraction_non_alphanumeric': 0.19644808743169398, 'fraction_numerical': 0.0029143897996357013, 'mean_word_length': 1.8301546391752577, 'pattern_counts': {'":': 0, '<': 355, '<?xml version=': 0, '>': 355, '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': '4020488', 'n_tokens_mistral': 3442, 'n_tokens_neox': 3163, 'n_words': 668}