benevalibre/benevalibre/templates/association/association_list.html

56 lignes
2.0 KiB
HTML

{% extends "base.html" %}
{% load tapeforms %}
{% block titlebuttons %}
<div class="title-buttons ml-sm-3 mt-3">
{% form filter.form %}
</div>
{% endblock %}
{% block content %}
{% if not object_list and not can_add_association %}
<p class="lead">Il n'y a aucune association pour le moment. Revenez plus tard !</p>
{% else %}
<div class="row">
{% for association in object_list %}
<div class="col-sm-6 col-md-4 col-lg-3 mb-3">
<a class="card card-hover h-100" href="{% url "association:detail" association.pk %}" title="En savoir plus sur « {{ association }} »…">
<div class="card-header flex-fill">
<div class="d-flex h-100 align-items-center justify-content-center">
<div class="text-center">
<h4 class="card-title mb-0">
{% if association.logo %}
<img src="{{ association.logo.medium.url }}" class="img-fluid" alt="{{ association }}">
{% else %}
{{ association }}
{% endif %}
</h4>
{% if not association.is_active %}
<span class="badge badge-warning">En modération</span>
{% endif %}
</div>
</div>
</div>
{% if association.description %}
<div class="card-body flex-shrink text-muted">
{{ association.description|truncatechars:120|linebreaksbr }}
</div>
{% endif %}
</a>
</div>
{% endfor %}
{% if can_add_association %}
<div class="col-sm-6 col-md-4 col-lg-3 mb-3">
<a href="{% url "association:create" %}" class="btn btn-lg btn-outline-primary border-dashed h-100 w-100">
<div class="d-flex h-100 align-items-center justify-content-center">
<div class="text-center">
<i class="fa fa-plus mr-2" aria-hidden="true"></i>Ajouter une association
</div>
</div>
</a>
</div>
{% endif %}
</div>
{% endif %}
{% endblock %}