Formulaire de la page d'accueil
This commit is contained in:
parent
e6593d4b14
commit
4f8374318b
2 changed files with 31 additions and 17 deletions
|
@ -66,8 +66,8 @@
|
|||
|
||||
{% if profile.text_field %}
|
||||
<div class="free-text">
|
||||
<span class="label">Champ libre</span>
|
||||
<p class="value">QJFBsd</p>
|
||||
<span class="label">{% trans "Champ libre" %}</span>
|
||||
<p class="value">{{ profile.text_field }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -1,20 +1,34 @@
|
|||
{% extends "fiches/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2> Chercher quelqu'un·e dans l'annuaire </h2>
|
||||
<form method='post' action="">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<input type="submit" value="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 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 }}
|
||||
|
||||
{% endblock %}
|
||||
<label for="id_year">{% trans "Promotion :" %}</label>
|
||||
{{ form.year }}
|
||||
|
||||
<label for="id_department">{% trans "Department :" %}</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 %}
|
||||
|
|
Loading…
Add table
Reference in a new issue