<commit_before>{% extends "auth_base.html" %}

{% load staticfiles %}

{% block title %}Return Borrowed Tools{% endblock %}

{% block ToolsNav %} active {% endblock %}

{% block auth-content %}
    <h1 class="page-header">Return Borrowed Tools</h1>

    <h3 class="sub-header">Tools you currently borrow</h3>

    <div class="container">
        <div class="row">
            {% for tool in toolreturns %}
                <div class="toolList">
                    <div class="col-sm-2">
                        {% if tool.1 == 0 %}
                            <span class="label label-danger toolduedate" title="DUE TODAY!!"> DUE TODAY!!</span>
                        {% elif tool.1 == 1 %}
                            <span class="label label-danger toolduedate" title="Due in {{ tool.1 }} day"> Due in {{ tool.1 }} day</span>
                        {% elif tool.1 >= 1 and tool.1 <= 4 %}
                            <span class="label label-warning toolduedate" title="Due in {{ tool.1 }} days">Due in {{ tool.1 }} days</span>
                        {% else %}
                            <span class="label label-success toolduedate" title="Due in {{ tool.1 }} days">Due in {{ tool.1 }} days</span>
                        {% endif %}
                        <figure>
                            <div id="toolThumbnail" >
                                <a href="{% url "toolManagement:viewTool" tool.0.id %}" class="thumbnail">
                                    <img class="img-square" src="{{tool.0.picture.url}}" alt="{{tool.0.name}}">
                                </a>
                            </div>
                            <figcaption>{{ tool.0.name }}</figcaption>
                        </figure>
                    </div>
                </div>
            {% empty %}
                <h4>You are not borrowing any tools currently</h4>
                <h4>Would you like to <a href="/browsetool">browse for tools?</a></h4>
            {% endfor %}
        </div>


        {% if toolreturns.paginator.num_pages >  1 %}
            <div class="row text-center toolPaginator">
                <div class="col-sm-12">
                    <ul class="pagination">
                        <li>
                            <a href="?page=1"> &laquo; First Page </a>
                        </li>
                        {% if toolreturns.has_previous %}
                            <li>
                                <a href="?page={{ toolreturns.previous_page_number }}"> &lsaquo; Previous </a>
                            </li>
                        {% else %}
                            <li>
                                <a href=""> &lsaquo; Previous </a>
                            </li>
                        {% endif %}

                        <li>
                            <a class = "pageTracker"> Page {{ toolreturns.number }} of {{ toolreturns.paginator.num_pages }} </a>
                        </li>

                        {% if toolreturns.has_next %}
                            <li>
                                <a href="?page={{ toolreturns.next_page_number }}"> Next &rsaquo; </a>
                            </li>
                        {% else %}
                            <li>
                                <a href=""> Next &rsaquo; </a>
                            </li>
                        {% endif %}
                        <li>
                            <a href="?page={{ toolreturns.paginator.num_pages }}"> Last Page &raquo; </a>
                        </li>
                    </ul>
                </div>
            </div>
        {% endif %}
    </div>
{% endblock %}

<commit_msg>Added tool return overdue case<commit_after>{% extends "auth_base.html" %}

{% load staticfiles %}

{% block title %}Return Borrowed Tools{% endblock %}

{% block ToolsNav %} active {% endblock %}

{% block auth-content %}
    <h1 class="page-header">Return Borrowed Tools</h1>

    <h3 class="sub-header">Tools you currently borrow</h3>

    <div class="container">
        <div class="row">
            {% for tool in toolreturns %}
                <div class="toolList">
                    <div class="col-sm-2">
                        {% if tool.1 < 0 %}
                            <span class="label label-danger toolduedate" title="DUE TODAY!!"> OVERDUE!!</span>
                        {% elif tool.1 == 0 %}
                            <span class="label label-danger toolduedate" title="DUE TODAY!!"> DUE TODAY!!</span>
                        {% elif tool.1 == 1 %}
                            <span class="label label-danger toolduedate" title="Due in {{ tool.1 }} day"> Due in {{ tool.1 }} day</span>
                        {% elif tool.1 >= 1 and tool.1 <= 4 %}
                            <span class="label label-warning toolduedate" title="Due in {{ tool.1 }} days">Due in {{ tool.1 }} days</span>
                        {% else %}
                            <span class="label label-success toolduedate" title="Due in {{ tool.1 }} days">Due in {{ tool.1 }} days</span>
                        {% endif %}
                        <figure>
                            <div id="toolThumbnail" >
                                <a href="{% url "toolManagement:viewTool" tool.0.id %}" class="thumbnail">
                                    <img class="img-square" src="{{tool.0.picture.url}}" alt="{{tool.0.name}}">
                                </a>
                            </div>
                            <figcaption>{{ tool.0.name }}</figcaption>
                        </figure>
                    </div>
                </div>
            {% empty %}
                <h4>You are not borrowing any tools currently</h4>
                <h4>Would you like to <a href="/browsetool">browse for tools?</a></h4>
            {% endfor %}
        </div>


        {% if toolreturns.paginator.num_pages >  1 %}
            <div class="row text-center toolPaginator">
                <div class="col-sm-12">
                    <ul class="pagination">
                        <li>
                            <a href="?page=1"> &laquo; First Page </a>
                        </li>
                        {% if toolreturns.has_previous %}
                            <li>
                                <a href="?page={{ toolreturns.previous_page_number }}"> &lsaquo; Previous </a>
                            </li>
                        {% else %}
                            <li>
                                <a href=""> &lsaquo; Previous </a>
                            </li>
                        {% endif %}

                        <li>
                            <a class = "pageTracker"> Page {{ toolreturns.number }} of {{ toolreturns.paginator.num_pages }} </a>
                        </li>

                        {% if toolreturns.has_next %}
                            <li>
                                <a href="?page={{ toolreturns.next_page_number }}"> Next &rsaquo; </a>
                            </li>
                        {% else %}
                            <li>
                                <a href=""> Next &rsaquo; </a>
                            </li>
                        {% endif %}
                        <li>
                            <a href="?page={{ toolreturns.paginator.num_pages }}"> Last Page &raquo; </a>
                        </li>
                    </ul>
                </div>
            </div>
        {% endif %}
    </div>
{% endblock %}


{'fraction_non_alphanumeric': 0.13821571238348868, 'fraction_numerical': 0.008521970705725699, 'mean_word_length': 0.9907235621521335, 'pattern_counts': {'":': 0, '<': 146, '<?xml version=': 0, '>': 147, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6174552', 'n_tokens_mistral': 2094, 'n_tokens_neox': 1844, 'n_words': 444}