<commit_before>{% extends "dashboard/base.html" %}
{% load i18n %}
{% load prices_i18n %}
{% load materializecss %}
{% load get_sort_by_toggle from shop %}
{% load staticfiles %}
{% load product_first_image from product_images %}
{% load utils %}

{% block title %}
  {% trans "Products" context "Dashboard products list" %} - {{ block.super }}
{% endblock %}

{% block body_class %}body-products-list{% endblock %}

{% block menu_products_class %}active{% endblock %}

{% block header_extra %}
  {% if product_classes %}
    {% if perms.product.edit_product %}
      <div class="btn-fab-fixed">
        {% if product_classes|length > 1 %}
        <a data-href="{% url "dashboard:product-add-select-class" %}" class="btn-fab-default waves-effect waves-light modal-trigger-custom" href="#base-modal" title="{% trans "Add product" context "Product list add button text" %}">
            <svg data-src="{% static "dashboard/images/add.svg" %}" />
          </a>
        {% else %}
          <a class="btn-fab-default waves-effect waves-light modal-trigger" href="{% url 'dashboard:product-add' product_classes.0.pk %}" title="{% trans "Add product" context "Product list add button text" %}">
            <svg data-src="{% static "dashboard/images/add.svg" %}" />
          </a>
        {% endif %}
      </div>
    {% endif %}
  {% endif %}
{% endblock %}

{% block breadcrumbs %}
  <ul class="breadcrumbs">
    <li class="visible-s">
      {% trans "Products" context "Dashboard products list" %}
    </li>
  </ul>
{% endblock %}

{% block menu_catalogue_class %} active{% endblock %}

{% block content %}
  <div class="row">
    <div class="col s12 l9" id="product-list">
    {% if products %}
      <div class="card">
        <form method="POST" action="{% url 'dashboard:product-bulk-update' %}" novalidate id="bulk-actions-form">
          {% csrf_token %}
          <input name="action" type="hidden" id="bulk-action" />
          <nav class="data-table-header-alternative single">
            <div class="bulk-info show-bulk">
              <div class="data-table-header-action-selected-items col inline"></div>
            </div>
            <div class="bulk-actions show-bulk nav-wrapper">
              <ul class="right">
                {% for action, label in bulk_action_form.action.field.widget.choices %}
                  <li>
                    <a href="" data-action="{{ action }}" class="btn-flat waves-effect">{{ label|upper }}</a>
                  </li>
                {% endfor %}
              </ul>
            </div>
          </nav>
          <div class="data-table-container">
            <table class="bordered highlight responsive data-table last-right-align">
          <thead>
            <tr>
              <th class="bulk-checkbox">
                <input id="select-all-products" type="checkbox" class="filled-in select-all switch-actions select-item">
                <label for="select-all-products"></label>
              </th>
              <th></th>
              {% get_sort_by_toggle 'name' as toggle %}
              <th class="wide {% if toggle.is_active %}active{% endif %}">
                <a href="{{ toggle.url }}">
                  <svg data-src="{{ toggle.sorting_icon }}" />
                  {% trans "Name" context "Products list table header" %}
                </a>
              </th>
              {% get_sort_by_toggle 'price' as toggle %}
              <th class="wide {% if toggle.is_active %}active{% endif %}">
                <a href="{{ toggle.url }}">
                  <svg data-src="{{ toggle.sorting_icon }}" />
                  {% trans "Price" context "Products list table header" %}
                </a>
              </th>
            </tr>
          </thead>
          <tbody>
          {% for product in products %}
            <tr class="avatar" data-action-go="{% url 'dashboard:product-detail' pk=product.pk %}">
              <td class="bulk-checkbox ignore-link">
                <input id="id_products_{{ product.pk }}" type="checkbox" name="products" value="{{ product.pk }}" class="filled-in switch-actions select-item">
                <label for="id_products_{{ product.pk }}"></label>
              </td>
              <td class="avatar">
                <img src="{% product_first_image product size="60x60" method="crop" %}"
                    srcset="{% product_first_image product size="60x60" method="crop" %} 1x, {% product_first_image product size="120x120" method="crop" %} 2x"
                    alt="">
              </td>
              <td>
                {{ product.name }}
              </td>
              <td>
                {% gross product.price html=True %}
              </td>
            </tr>
          {% endfor %}
          </tbody>
          </table>
          </div>
        </form>
      </div>
      {% paginate products %}
    {% else %}
      {% if is_empty %}
        {% include 'dashboard/product/zero_page.html' %}
      {% else %}
        <div class="col s12">
          <div class="not-found">
            <p class="grey-text">
              {% trans "No products found." context "Empty product list message" %}
            </p>
          </div>
        </div>
      {% endif %}
    {% endif %}
    </div>
    <div class="col s12 l3" id="filters">
      {% if False %}{% add_filters filter %}{% endif %}
    </div>
  </div>
{% endblock %}<commit_msg>Fix filter displaying<commit_after>{% extends "dashboard/base.html" %}
{% load i18n %}
{% load prices_i18n %}
{% load materializecss %}
{% load get_sort_by_toggle from shop %}
{% load staticfiles %}
{% load product_first_image from product_images %}
{% load utils %}

{% block title %}
  {% trans "Products" context "Dashboard products list" %} - {{ block.super }}
{% endblock %}

{% block body_class %}body-products-list{% endblock %}

{% block menu_products_class %}active{% endblock %}

{% block header_extra %}
  {% if product_classes %}
    {% if perms.product.edit_product %}
      <div class="btn-fab-fixed">
        {% if product_classes|length > 1 %}
        <a data-href="{% url "dashboard:product-add-select-class" %}" class="btn-fab-default waves-effect waves-light modal-trigger-custom" href="#base-modal" title="{% trans "Add product" context "Product list add button text" %}">
            <svg data-src="{% static "dashboard/images/add.svg" %}" />
          </a>
        {% else %}
          <a class="btn-fab-default waves-effect waves-light modal-trigger" href="{% url 'dashboard:product-add' product_classes.0.pk %}" title="{% trans "Add product" context "Product list add button text" %}">
            <svg data-src="{% static "dashboard/images/add.svg" %}" />
          </a>
        {% endif %}
      </div>
    {% endif %}
  {% endif %}
{% endblock %}

{% block breadcrumbs %}
  <ul class="breadcrumbs">
    <li class="visible-s">
      {% trans "Products" context "Dashboard products list" %}
    </li>
  </ul>
{% endblock %}

{% block menu_catalogue_class %} active{% endblock %}

{% block content %}
  <div class="row">
    <div class="col s12 l9" id="product-list">
    {% if products %}
      <div class="card">
        <form method="POST" action="{% url 'dashboard:product-bulk-update' %}" novalidate id="bulk-actions-form">
          {% csrf_token %}
          <input name="action" type="hidden" id="bulk-action" />
          <nav class="data-table-header-alternative single">
            <div class="bulk-info show-bulk">
              <div class="data-table-header-action-selected-items col inline"></div>
            </div>
            <div class="bulk-actions show-bulk nav-wrapper">
              <ul class="right">
                {% for action, label in bulk_action_form.action.field.widget.choices %}
                  <li>
                    <a href="" data-action="{{ action }}" class="btn-flat waves-effect">{{ label|upper }}</a>
                  </li>
                {% endfor %}
              </ul>
            </div>
          </nav>
          <div class="data-table-container">
            <table class="bordered highlight responsive data-table last-right-align">
          <thead>
            <tr>
              <th class="bulk-checkbox">
                <input id="select-all-products" type="checkbox" class="filled-in select-all switch-actions select-item">
                <label for="select-all-products"></label>
              </th>
              <th></th>
              {% get_sort_by_toggle 'name' as toggle %}
              <th class="wide {% if toggle.is_active %}active{% endif %}">
                <a href="{{ toggle.url }}">
                  <svg data-src="{{ toggle.sorting_icon }}" />
                  {% trans "Name" context "Products list table header" %}
                </a>
              </th>
              {% get_sort_by_toggle 'price' as toggle %}
              <th class="wide {% if toggle.is_active %}active{% endif %}">
                <a href="{{ toggle.url }}">
                  <svg data-src="{{ toggle.sorting_icon }}" />
                  {% trans "Price" context "Products list table header" %}
                </a>
              </th>
            </tr>
          </thead>
          <tbody>
          {% for product in products %}
            <tr class="avatar" data-action-go="{% url 'dashboard:product-detail' pk=product.pk %}">
              <td class="bulk-checkbox ignore-link">
                <input id="id_products_{{ product.pk }}" type="checkbox" name="products" value="{{ product.pk }}" class="filled-in switch-actions select-item">
                <label for="id_products_{{ product.pk }}"></label>
              </td>
              <td class="avatar">
                <img src="{% product_first_image product size="60x60" method="crop" %}"
                    srcset="{% product_first_image product size="60x60" method="crop" %} 1x, {% product_first_image product size="120x120" method="crop" %} 2x"
                    alt="">
              </td>
              <td>
                {{ product.name }}
              </td>
              <td>
                {% gross product.price html=True %}
              </td>
            </tr>
          {% endfor %}
          </tbody>
          </table>
          </div>
        </form>
      </div>
      {% paginate products %}
    {% else %}
      {% if is_empty %}
        {% include 'dashboard/product/zero_page.html' %}
      {% else %}
        <div class="col s12">
          <div class="not-found">
            <p class="grey-text">
              {% trans "No products found." context "Empty product list message" %}
            </p>
          </div>
        </div>
      {% endif %}
    {% endif %}
    </div>
    <div class="col s12 l3" id="filters">
      {% if not is_empty %}{% add_filters filter %}{% endif %}
    </div>
  </div>
{% endblock %}
{'fraction_non_alphanumeric': 0.16662022847589858, 'fraction_numerical': 0.005572582892170521, 'mean_word_length': 1.9071274298056156, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 173, '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': '3503628', 'n_tokens_mistral': 3391, 'n_tokens_neox': 3051, 'n_words': 737}