<commit_before>{% extends "projects/base_project.html" %}
{% load i18n %}
{% load projects_tags %}
{% load privacy_tags %}
{% load core_tags %}

{% block title %}
Versions
{% endblock title %}

{% block project_editing %}
  {% with versions_active="active" %}
    {% include "core/project_bar.html" %}
  {% endwith %}
{% endblock %}


{% block content %}

  <div class="project-version-list">

    <div class="module project-versions-active">
      <div class="module-wrapper">

        <div class="module-header">
          <h1>{% trans "Active Versions" %}</h1>
        </div>

        <div class="module-list">
          <div class="module-list-wrapper">
            <ul>
              {% for version in active_versions|sort_version_aware %}
                {% block active-versions %}
                  <li class="module-item">
                    {# Link to the docs #}
                    <a class="module-item-title" href="{{ version.get_absolute_url }}">{{ version.slug }}</a>

                    {% if request.user|is_admin:project %}
                      <span class="right-menu">
                        {{ version.get_privacy_level_display }}
                      </span>
                    {% endif %}

                    {% if not version.slug in version.identifier %}
                      <span class="right-menu quiet version-branch">{{ version.identifier_friendly|truncatechars:24 }}</span>
                    {% endif %}

                    {% if request.user|is_admin:project %}
                      <ul class="module-item-menu">
                        <li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit" %}</a></li>
                      </ul>
                    {% else %}
                      <ul class="module-item-menu">
                        <li><a href="{{ version.get_absolute_url }}">{% trans "View Docs" %}</a></li>
                      </ul>
                    {% endif %}

                  </li>
                {% endblock active-versions %}

              {% empty %}
                <li class="module-item">
                  <p class="quiet">
                    {% trans "No active versions." %}
                  </p>
                </li>
              {% endfor %}
            </ul>
          </div>
        </div>

      </div>
    </div>

    {% if request.user|is_admin:project or request.user.is_staff %}
    <div class="module project-versions-inactive">
      <div class="module-wrapper">

        {% if inactive_versions %}
          <div class="module-header">
            <h1>{% trans "Activate a version" %}</h1>
            <p>{% trans "Active versions are built whenever new code is pushed to that branch or tag." %}</p>
          </div>

          {# Version search #}
          <div class="wide-search-bar">
            <div class="wide-search-bar-wrapper clearfix">
              <form action="." method="GET">
                <div class="text-input-wrapper">
                  <input type="text" name="version_filter" value="{{ request.GET.version_filter }}" placeholder="1.0, 2.0, devel">
                </div>
                <div class="submit-input-wrapper">
                  <input type="submit" value="{% trans 'Filter Inactive Versions' %}">
                </div>
              </form>
            </div>
          </div>

          <div class="module-list">
            <div class="module-list-wrapper">
              <ul>
                {% for version in inactive_versions|sort_version_aware %}

                  {% block inactive-versions %}
                    <li class="module-item">
                      {# Link to the docs #}
                      <span class="quiet">{{ version.slug }}</span>


                      {% if request.user|is_admin:project %}
                        <span class="right-menu">
                          {{ version.get_privacy_level_display }}
                        </span>
                      {% endif %}

                      {% if not version.slug in version.identifier_friendly %}
                        <span class="right-menu quiet version-branch">{{ version.identifier_friendly|truncatechars:24 }}</span>
                      {% endif %}

                      {% if request.user|is_admin:project %}
                        <ul class="module-item-menu">
                          <li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit & Activate" %}</a></li>
                        </ul>
                      {% endif %}

                    </li>
                  {% endblock inactive-versions %}

                {% endfor %}
              </ul>
            </div><commit_msg>Edit & Activate -> Activate<commit_after>{% extends "projects/base_project.html" %}
{% load i18n %}
{% load projects_tags %}
{% load privacy_tags %}
{% load core_tags %}

{% block title %}
Versions
{% endblock title %}

{% block project_editing %}
  {% with versions_active="active" %}
    {% include "core/project_bar.html" %}
  {% endwith %}
{% endblock %}


{% block content %}

  <div class="project-version-list">

    <div class="module project-versions-active">
      <div class="module-wrapper">

        <div class="module-header">
          <h1>{% trans "Active Versions" %}</h1>
        </div>

        <div class="module-list">
          <div class="module-list-wrapper">
            <ul>
              {% for version in active_versions|sort_version_aware %}
                {% block active-versions %}
                  <li class="module-item">
                    {# Link to the docs #}
                    <a class="module-item-title" href="{{ version.get_absolute_url }}">{{ version.slug }}</a>

                    {% if request.user|is_admin:project %}
                      <span class="right-menu">
                        {{ version.get_privacy_level_display }}
                      </span>
                    {% endif %}

                    {% if not version.slug in version.identifier %}
                      <span class="right-menu quiet version-branch">{{ version.identifier_friendly|truncatechars:24 }}</span>
                    {% endif %}

                    {% if request.user|is_admin:project %}
                      <ul class="module-item-menu">
                        <li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Edit" %}</a></li>
                      </ul>
                    {% else %}
                      <ul class="module-item-menu">
                        <li><a href="{{ version.get_absolute_url }}">{% trans "View Docs" %}</a></li>
                      </ul>
                    {% endif %}

                  </li>
                {% endblock active-versions %}

              {% empty %}
                <li class="module-item">
                  <p class="quiet">
                    {% trans "No active versions." %}
                  </p>
                </li>
              {% endfor %}
            </ul>
          </div>
        </div>

      </div>
    </div>

    {% if request.user|is_admin:project or request.user.is_staff %}
    <div class="module project-versions-inactive">
      <div class="module-wrapper">

        {% if inactive_versions %}
          <div class="module-header">
            <h1>{% trans "Activate a version" %}</h1>
            <p>{% trans "Active versions are built whenever new code is pushed to that branch or tag." %}</p>
          </div>

          {# Version search #}
          <div class="wide-search-bar">
            <div class="wide-search-bar-wrapper clearfix">
              <form action="." method="GET">
                <div class="text-input-wrapper">
                  <input type="text" name="version_filter" value="{{ request.GET.version_filter }}" placeholder="1.0, 2.0, devel">
                </div>
                <div class="submit-input-wrapper">
                  <input type="submit" value="{% trans 'Filter Inactive Versions' %}">
                </div>
              </form>
            </div>
          </div>

          <div class="module-list">
            <div class="module-list-wrapper">
              <ul>
                {% for version in inactive_versions|sort_version_aware %}

                  {% block inactive-versions %}
                    <li class="module-item">
                      {# Link to the docs #}
                      <span class="quiet">{{ version.slug }}</span>


                      {% if request.user|is_admin:project %}
                        <span class="right-menu">
                          {{ version.get_privacy_level_display }}
                        </span>
                      {% endif %}

                      {% if not version.slug in version.identifier_friendly %}
                        <span class="right-menu quiet version-branch">{{ version.identifier_friendly|truncatechars:24 }}</span>
                      {% endif %}

                      {% if request.user|is_admin:project %}
                        <ul class="module-item-menu">
                          <li><a href="{% url "project_version_detail" project.slug version.slug %}">{% trans "Activate" %}</a></li>
                        </ul>
                      {% endif %}

                    </li>
                  {% endblock inactive-versions %}

                {% endfor %}
              </ul>
            </div>
{'fraction_non_alphanumeric': 0.14442432633933328, 'fraction_numerical': 0.0029822132282458194, 'mean_word_length': 1.368819374369324, 'pattern_counts': {'":': 0, '<': 159, '<?xml version=': 0, '>': 160, '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': '5104171', 'n_tokens_mistral': 2670, 'n_tokens_neox': 2327, 'n_words': 524}