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

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


{% block content %}
<ul class="list-group">
    {% for equipment in equipment_list %}
    <li class="list-group-item ">
        <div class="btn-group pull-right">
            <button type="button" class="btn btn-default dropdown-toggle btn-xs" data-toggle="dropdown">
                <span class="{% fa_class 'cog' %}"></span>
            </button>
            <ul class="dropdown-menu" role="menu">
                <li>
                    <a href="{% url 'exercise:equipment:edit' equipment.id %}" class="wger-modal-dialog">{% trans 'Edit' %}</a>
                </li>
                <li>
                    <a href="{% url 'exercise:equipment:delete' equipment.id %}" class="wger-modal-dialog">{% trans 'Delete' %}</a>
                </li>
            </ul>
        </div>
        {{equipment.name}}
    </li>
    {% empty %}
        <li class="list-group-item">
            {% trans "Nothing found" %}
        </li>
    {% endfor %}
</ul>
{% endblock %}




{% block sidebar %}
{% if perms.exercises.add_equipment %}
<p>
    <a href="{% url 'exercise:equipment:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
        {% trans "Add new equipment" %}
    </a>
</p>
{% endif %}
{% endblock %}
