{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load staticfiles %}
{% load manager_extras %}

{% block title %}{% trans "Ingredient weight units" %}{% endblock %}


{% block content %}

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

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




{% block sidebar %}
{% if perms.exercises %}
<h3>{% trans "Options" %}</h3>
<p>
       <a href="{% url 'weight-unit-add' %}"
          class="modal-dialog">
       <img src="{% static 'images/icons/new.svg' %}"
            width="32"
            height="32"
            alt="{% trans 'Add new weight unit' %}"
            title="{% trans 'Add new weight unit' %}">
       {% trans "Add new weight unit" %}
       </a>
</p>
{% endif %}
{% endblock %}
