<commit_before>{% extends 'base.html' %}

{% load static %}

{% block css %}
    {{ block.super }}
    <link href="{% static 'css/dashboard.css' %}" rel="stylesheet">
{% endblock %}

{% block js %}
    {{  block.super }}
    <script>
        var URLS = {
        REMOVE_ITEM: '{% url "main:remove_shopping" %}',
        ADD_ITEM: '{% url "main:adding_from_all_products" %}',
        BUY_ITEMS: '{% url "main:buy_all_products" %}'
        }
    </script>
    <script type="text/javascript" src="{% static 'jquery/dashboard.js' %}"></script>
        <script type="text/javascript" src="{% static 'js/base64.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/sprintf.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/jspdf.js' %}"></script>
{% endblock %}

{% block container %}
    <h3>You logged in as {{ user }}, here are your dashboards</h3>
    <h5 class="today">Today: {% now "d-m-Y" %}</h5>
    <!-- Choose list !-->
    <div class="choose_list c_both overflow_a">
        {% for listprod in listproduct %}
            <p class="add-item" data-product-id = "{{ listprod.id }}">
                {{ listprod.name}}
                {% if listprod.last_buy %}
                    <span class="last-bought">last bought {{ listprod.last_buy }}</span>
                {% endif %}
            </p>
        {% endfor %}
    </div>


    <!-- AddProduct form !-->
    <div class="add_form">
    <form action="." method="post">
        {% csrf_token %}
        <table>
            {{ form }}
            <tr>
                <td><input type="submit" value="Submit" class="btn btn-primary" /></td>
                <td></td>
            </tr>
        </table>
    </form>
    </div>


    <!-- Displaying elements in current dashboard !-->
    <div class="selector">
    <p class="header-sh-list">Shopping lists attached to this dashboard :</p>
        <p class = "items_of_buylist">
            {% for prod in curr_buylist.products.all %}
                <p class="product-item p_rel" data-item-name="{{ prod.id }}">
                    <img src="{{ prod.category.icon.url }}" />
                    {{ prod.name }}
                    <i class="icon-remove-circle remove-product" data-product-id='{{ prod.id }}'></i>
                </p>
            {% endfor %}
            <a href="#" class="btn btn-warning buy-products">Buy</a>
        </p>
        <br>
    </div>

    <!-- Suggested products !-->
    <div id="suggested_products">
        <p class="header-sh-list">Maybe you are out of these products? Purchase:</p>
        {% for prod in suggested %}
            <p class="add-item" data-item-name = "{{ prod.id }}">{{ prod.name }}</p>
        {% endfor %}
    </div>
{% endblock %}<commit_msg>added modificator classes to an existing elements, #3<commit_after>{% extends 'base.html' %}

{% load static %}

{% block css %}
    {{ block.super }}
    <link href="{% static 'css/dashboard.css' %}" rel="stylesheet">
{% endblock %}

{% block js %}
    {{  block.super }}
    <script>
        var URLS = {
        REMOVE_ITEM: '{% url "main:remove_shopping" %}',
        ADD_ITEM: '{% url "main:adding_from_all_products" %}',
        BUY_ITEMS: '{% url "main:buy_all_products" %}'
        }
    </script>
    <script type="text/javascript" src="{% static 'jquery/dashboard.js' %}"></script>
        <script type="text/javascript" src="{% static 'js/base64.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/sprintf.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/jspdf.js' %}"></script>
{% endblock %}

{% block container %}
    <h3>You logged in as {{ user }}, here are your dashboards</h3>
    <h5 class="today f_right">Today: {% now "d-m-Y" %}</h5>
    <!-- Choose list !-->
    <div class="choose_list c_both overflow_a f_right">
        {% for listprod in listproduct %}
            <p class="choose-item" data-product-id = "{{ listprod.id }}">
                {{ listprod.name}}
                {% if listprod.last_buy %}
                    <span class="last-bought">last bought {{ listprod.last_buy }}</span>
                {% endif %}
            </p>
        {% endfor %}
    </div>


    <!-- AddProduct form !-->
    <div class="add_form f_right overflow_a c_both">
    <form action="." method="post">
        {% csrf_token %}
        <table>
            {{ form }}
            <tr>
                <td></td>
                <td><input type="submit" value="Submit" class="btn btn-primary" /></td>
            </tr>
        </table>
    </form>
    </div>


    <!-- Displaying elements in current dashboard !-->
    <div class="selector">
    <p class="header-sh-list">Shopping lists attached to this dashboard :</p>
        <p class = "items_of_buylist">
            {% for prod in curr_buylist.products.all %}
                <p class="product-item p_rel" data-item-name="{{ prod.id }}">
                    <img src="{{ prod.category.icon.url }}" />
                    {{ prod.name }}
                    <i class="icon-remove-circle remove-product" data-product-id='{{ prod.id }}'></i>
                </p>
            {% endfor %}
            <a href="#" class="btn btn-warning buy-products">Buy</a>
        </p>
        <br>
    </div>

    <!-- Suggested products !-->
    <div id="suggested_products">
        <p class="header-sh-list">Maybe you are out of these products? Purchase:</p>
        {% for prod in suggested %}
            <p class="choose-item" data-item-name = "{{ prod.id }}">
                <img src="{{ prod.category.icon.url }}" />
                {{ prod.name }}
            </p>
        {% endfor %}
    </div>
{% endblock %}
{'fraction_non_alphanumeric': 0.19023181737745531, 'fraction_numerical': 0.0023004777915413203, 'mean_word_length': 1.99364406779661, 'pattern_counts': {'":': 0, '<': 120, '<?xml version=': 0, '>': 120, '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': '2336635', 'n_tokens_mistral': 1877, 'n_tokens_neox': 1738, 'n_words': 399}