{% extends "notes/liste.html" %}

{% block title %}{{block.super}} Liste des sujets {% endblock %}

{% block breadcrumbs %}
    <h6 class="navbar-text text-white my-2">Liste des sujets</h6>
{% endblock %}

{% block sidebar_insert %}
  <h4 class="sidebar-heading mt-4 px-3">Rechercher</h4>
  <form class="px-3" action="{% url "notes:liste-sujet" %}" method="POST" class="form form-group">
    {% csrf_token %}
    <div class="input-group">
      <input type="text" name="q" class="form-control" placeholder="Chercher un sujet" aria-describedby="basic-addon1">
      <span class="input-group-btn">
        <button type="submit" class="btn btn-primary">C</button>
      </span>
    </div>
  </form>
  <h4 class="sidebar-heading mt-4 px-3">Outils</h4>
  <div class="px-3"><a class="btn btn-primary btn-block" href="{% url "notes:create-sujet" %}">Ajouter un sujet</a></div>
{% endblock %}

{% block search %}
  {% if query_text %}<div class="well well-sm text-center">
      <h4><span class="label label-primary">'{{query_text}}'</span>
      <span class="label label-danger">
        {% if not object_list %}Aucun résultat
        {% else %} {{ object_list.count }} résultats
        {% endif %}
      </span></h4>
  </div>{% endif %}
{% endblock %}

