{% extends 'base.html' %}
{% load static %}
{% block content %}

    <div style="max-width: 50%;">
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th><b>Código</b></th>
                    <th><b>Nome</b></th>
                    <th><b>Quantidade</b></th>
                    <th><b>Atualizar</b></th>
                    <th><b>Apagar</b></th>
                </tr>
            </thead>

            <tbody>
                {% for item in items %}
                    <tr>
                        <th>{{ item.codigo }}</th>
                        <th>{{ item.nome }}</th>
                        <th>{{ item.quantidade }}</th>
                        <th><a href="{% url 'core:atualiza_item' pk=item.id %}"><i class="material-icons">edit</i></a></th>
                        <th><a href="{% url 'core:deleta_item' pk=item.id %}"><i class="material-icons">delete</i></a></th>
                    </tr>
                {% endfor %}
            </tbody>
        </table>

{% endblock content %}
