{% extends "base.html" %}
{% load i18n staticfiles wger_extras %}

{% block title %}{% trans "Equipment list" %}{% endblock %}


{% block content %}

<table class="table">
<thead>
<tr>
    <th>{% trans "Actions" %}</th>
    <th>{% trans "Name" %}</th>
</tr>
</thead>
<tbody>
{% for equipment in equipment_list %}
<tr>
    <td class="no-hover">
        <a href="{% url 'exercise:equipment:delete' equipment.id %}"
           class="wger-modal-dialog">
            <img src="{% static 'images/icons/trash.svg' %}"
                 width="22"
                 height="22"
                 alt="{% trans 'Delete' %}"
                 title="{% trans 'Delete' %}">
        </a>
        <a href="{% url 'exercise:equipment:edit' equipment.id %}"
           class="wger-modal-dialog">
            <img src="{% static 'images/icons/edit.svg' %}"
                 width="22"
                 height="22"
                 alt="{% trans 'Edit' %}"
                 title="{% trans 'Edit' %}">
        </a>
    </td>
    <td>{{equipment.name}}</td>
</tr>
{% empty %}
<tr>
    <td colspan="2">{% trans "Nothing found" %}</td>
</tr>
{% endfor %}
</tbody>

</table>
<div style="padding-top:3em;"></div>
{% pagination paginator page_obj %}
{% endblock %}




{% block sidebar %}
{% if perms.exercises.add_equipment %}
<h4>{% trans "Options" %}</h4>
<p>
       <a href="{% url 'exercise:equipment:add' %}"
          {% auto_link_css flavour "wger-modal-dialog" %}>
       <img src="{% static 'images/icons/new.svg' %}"
            width="32"
            height="32"
            alt="{% trans 'Add new equipment' %}"
            title="{% trans 'Add new equipment' %}">
       {% trans "Add new equipment" %}
       </a>
</p>
{% endif %}
{% endblock %}
