{% load thumbnail %}
{% load i18n %}
{% load govplan %}

{% if object_list|length == 0 %}
  <p>
    {% trans "Could not find any results. Try different keywords or browse the categories." %}
  </p>
{% else %}
<div class="row">
  {% for object in object_list %}

  <div class="col-sm-6 col-lg-4 mb-4">
    <div class="card">
        <div class="card-body">
          <a href="{{ object.get_absolute_url }}" class="text-decoration-none text-reset">
            <h5 class="card-title">{{ object.title }}</h5>
          </a>
          <p class="card-text">
            {% if object.quote %}
            <blockquote>
              {{ object.quote|striptags|truncatewords:20|addquotes }}
            </blockquote>
            {% endif %}      
          </p>
          <div class="d-flex mt-auto">
            <a href="{{ object.get_absolute_url }}" class="text-decoration-none">
              <span href="{{ object.get_absolute_url }}" class="action-link text-blue-600 ">
                → mehr lesen
              </span>
            </a>      
            <div class="ms-auto">
              <span class="badge text-bg-{{ object.get_status_css }}">
                {{ object.get_status_display }}
              </span>
            </div>
          </div>          
        </div>
    </div>
  </div>
  
  {% endfor %}
</div>
{% endif %}
