annuaire-eleves/fiches/templates/fiches/home.html

34 lines
835 B
HTML

{% extends "fiches/base.html" %}
{% load i18n %}
{% block content %}
<div class="content" id="content-home">
<h2>{% trans "Chercher quelqu'un·e dans l'annuaire" %}</h2>
<form method="post" action="">
{% csrf_token %}
<label for="id_name">{% trans "Nom/Surnom :" %}</label>
{{ form.name }}
<label for="id_year">{% trans "Promotion :" %}</label>
{{ form.year }}
<label for="id_department">{% trans "Départment :" %}</label>
{{ form.department }}
<input type="submit" value="{% trans "Recherche" %}">
</form>
<div>
<ul>
{% for profile in result %}
<li>
<a href="{% url 'fiche' profile.user.username %}">{{profile.full_name}} ({{ profile.department.all|join:", " }} {{profile.promotion}})</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}