{% extends "idhub/base_admin.html" %}
{% load i18n %}

{% block content %}
<h3>
  <i class="{{ icon }}"></i>
  {{ subtitle }}
</h3>
<div class="row mt-5">
  <div class="col">
    <div class="table-responsive">
      <table class="table table-striped table-sm">
        <thead>
          <tr>
            <th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'Service' %}</button></th>
            <th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'Description' %}</button></th>
            <th scope="col"><button type="button" class="btn btn-grey border border-dark">{% trans 'Rol' %}</button></th>
            <th scope="col"></th>
            <th scope="col"></th>
          </tr>
        </thead>
        <tbody>
          {% for service in services.all %}
          <tr>
            <td>{{ service.domain }}</td>
            <td>{{ service.description }}</td>
            <td>{{ service.rol.name }}</td>
            <td><a href="{% url 'idhub:admin_service_edit' service.id %}" title="{% trans 'Edit' %}"><i class="bi bi-pencil-square"></i></a></td>
            <td><a href="{% url 'idhub:admin_service_del' service.id %}" title="{% trans 'Delete' %}"><i class="bi bi-trash"></i></a></td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
      <div class="form-actions-no-box">
        <a class="btn btn-green-admin" href="{% url 'idhub:admin_service_new' %}">{% translate "Add Service" %} <i class="bi bi-plus"></i></a>
      </div>
    </div>
  </div>
</div>
{% endblock %}
