{% extends 'base.html' %}

{% load static %}
{% load stud_tags %}

{% block title %} 
  {{ block.super }} {{title}}
{% endblock title %} Студенты

{% block content %}
     {% comment %} <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
      <h1 class="h2">Dashboard</h1>
      <div class="btn-toolbar mb-2 mb-md-0">
        <div class="btn-group me-2">
          <button type="button" class="btn btn-sm btn-outline-secondary">Share</button>
          <button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
        </div>
        <button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle">
          <span data-feather="calendar" class="align-text-bottom"></span>
          This week
        </button>
      </div>
    </div> {% endcomment %}

    <h2 class="text-center">{{t_title}}:</h2>
    <div class="table-responsive">
      <table class="table table-striped table-sm table-hover table-bordered">
        <thead class="text-center table-secondary">
          <tr>
            {% comment %} <th scope="col" class="text-end">№</th> {% endcomment %}
            <th scope="col">Фамилия</th>
            <th scope="col">Имя</th>
            <th scope="col">Отчество</th>
            <th scope="col">E-mail</th>
            <th scope="col">Группа</th>
          </tr>
        </thead>
        <tbody class="text-center">
          {% for item in objects %}
          <tr class="align-middle">
            {% comment %} <td class="text-end align-item-bottom">{{ forloop.counter }}.</td> {% endcomment %}
            <td>{{ item.client.surname }}</td>
            <td>{{ item.client.name }}</td>
            <td>{{item.client.patronymic}}</td>
            <td>{{item.client.e_mail}}</td>
            <td>{{item.group.title}}</td>
          </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
    <div class="row container-fluid pt-2 pb-4">
      <div class="col-1"></div>
      <div class="col-4 mx-auto d-grid">
          {% comment %} <a href="{% url 'gen_list_students' group_id=group_id %}" class="btn btn-primary"> Список </a> {% endcomment %}
      </div>
      <div class="col-2"></div>
      <div class="col-4 mx-auto d-grid">
          {% comment %} <a href="# " class="btn btn-primary" target="_blank">Список для SDO</a>         {% endcomment %}
      </div>
      <div class="col-1"></div>
    </div>
{% endblock content %}

