{% extends "admin/admin_base.html" %}
{% load i18n %}

{% block admin_title %}{% trans "Tags" %}{% endblock %}

{% block content %}
<div class="row align-center mb-2">
    <h5 class="max bold">{% trans "Tag Management" %}</h5>
    <a href="{% url 'admin_tag_add' %}" class="button primary round">
        <i>add</i>
        <span>{% trans "Add Tag" %}</span>
    </a>
</div>

<table class="border striped no-space">
    <thead>
        <tr>
            <th class="min">{% trans "ID" %}</th>
            <th class="max">{% trans "Name" %}</th>
            <th>{% trans "Slug" %}</th>
            <th class="right-align">{% trans "Actions" %}</th>
        </tr>
    </thead>
    <tbody>
        {% for tag in tags %}
        <tr class="pointer" onclick="location.href='{% url 'admin_tag_edit' tag.pk %}'">
            <td class="min">{{ tag.id }}</td>
            <td class="max"><b>{{ tag.name }}</b></td>
            <td>{{ tag.slug }}</td>
            <td class="right-align">
                <a href="{% url 'admin_tag_delete' tag.pk %}" class="button circle transparent" onclick="event.stopPropagation();" title="{% trans 'Delete' %}"><i>delete</i></a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}
