{% extends 'layout/base.html' %}

{% block 'css' %}
{% endblock %}

{% block 'content' %}
    {% if object_list %}
        <a href="{% url 'requests:create' %}">Request a new book</a>
        <h4>List of your requested books</h4>
        <table>
            <tr>
                <th>Title</th>
                <th>Description</th>
                <th>Status</th>
                <th></th>
                <th></th>
            </tr>
        {% for req in object_list %}
            <tr>
                <td><a href="{% url 'requests:detail' req.pk %}">{{ req.title }}</a></td>
                <td>{{ req.description|truncatewords:20 }}</td>
                <td>{{ req.get_status_display }}</td>
                <td>
                    {% if req.is_waiting or req.is_canceled %}
                    <a href="{% url 'requests:update' req.pk %}" class="button" >Update</a>
                    {% endif %}
                </td>
                <td>
                    {% if req.is_waiting %}
                        <a href="{% url 'requests:cancel' req.pk %}" class="button" >Cancel</a></td>
                    {% endif %}
            </tr>
        {% endfor %}
        </table>
    {% else %}
    <p>You have no request books.</p>
    {% endif %}
{% endblock %}

{% block 'js' %}
{% endblock %}

{% extends 'layout/base.html' %}

{% block 'css' %}
{% endblock %}

{% block 'content' %}
    <a href="{% url 'requests:create' %}">Request a new book</a>
    {% if object_list %}
        <h4>List of your requested books</h4>
        <table>
            <tr>
                <th>Title</th>
                <th>Description</th>
                <th>Status</th>
                <th></th>
                <th></th>
            </tr>
        {% for req in object_list %}
            <tr>
                <td><a href="{% url 'requests:detail' req.pk %}">{{ req.title }}</a></td>
                <td>{{ req.description|truncatewords:20 }}</td>
                <td>{{ req.get_status_display }}</td>
                <td>
                    {% if req.is_waiting or req.is_canceled %}
                    <a href="{% url 'requests:update' req.pk %}" class="button" >Update</a>
                    {% endif %}
                </td>
                <td>
                    {% if req.is_waiting %}
                        <a href="{% url 'requests:cancel' req.pk %}" class="button" >Cancel</a></td>
                    {% endif %}
            </tr>
        {% endfor %}
        </table>
    {% else %}
    <p>You have no request books.</p>
    {% endif %}
{% endblock %}

{% block 'js' %}
{% endblock %}

Fix create new requested books link
Fix create new requested books link
