{% extends 'sh/layout.html' %}
{% load static %}

{% block contenido %}
<div class="row">
    <div class="col-md-12">
        <div class="table-responsive">
            <table class="table table-striped table-sm">
                <thead>
                    <tr>
                        <th>Inicio</th>
                        <th>Fin</th>
                        <th>Comando</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    
                    {% for obj in objects %}
                    <tr>
                        <td><a href="#">{{ obj.start }}</a></td>
                        <td><a href="#">{{ obj.end }}</a></td>
                        <td><a href="#">{{ obj.text|truncatechars:100 }}</a></td>
                        <td class="text-right">
                            <a href="{% url 'sh:save_command' obj.pk %}" class="btn btn-sm">Guardar en favoritos</a>
                        </td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %}
