forked from DGNum/gestioCOF
- The autocompletion feature works again - The template is a bit more readable (indentation) - The `options` variable in the template is no longer a integer but a boolean.
58 lines
1.7 KiB
HTML
58 lines
1.7 KiB
HTML
{% load utils %}
|
|
<ul>
|
|
{% if members %}
|
|
<li class="autocomplete-header">Membres du COF</li>
|
|
|
|
{% for member in members %}
|
|
{% if forloop.counter < 5 %}
|
|
<li class="autocomplete-value">
|
|
<a href="{% url 'user-registration' member.username %}">
|
|
{{ member|highlight_user:q }}
|
|
</a>
|
|
</li>
|
|
{% elif forloop.counter == 5 %}
|
|
<li class="autocomplete-more">...</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if users %}
|
|
<li class="autocomplete-header">Utilisateurs de GestioCOF</li>
|
|
|
|
{% for user in users %}
|
|
{% if forloop.counter < 5 %}
|
|
<li class="autocomplete-value">
|
|
<a href="{% url 'user-registration' user.username %}">
|
|
{{ user|highlight_user:q }}
|
|
</a>
|
|
</li>
|
|
{% elif forloop.counter == 5 %}
|
|
<li class="autocomplete-more">...</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if clippers %}
|
|
<li class="autocomplete-header">Utilisateurs <tt>clipper</tt></li>
|
|
|
|
{% for clipper in clippers %}
|
|
{% if forloop.counter < 5 %}
|
|
<li class="autocomplete-value">
|
|
<a href="{% url 'clipper-registration' clipper.clipper clipper.fullname %}">
|
|
{{ clipper|highlight_clipper:q }}
|
|
</a>
|
|
</li>
|
|
{% elif forloop.counter == 5 %}
|
|
<li class="autocomplete-more">...</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if not options %}
|
|
<li class="autocomplete-header">Aucune correspondance trouvée</li>
|
|
{% else %}
|
|
<li class="autocomplete-header">Pas dans la liste ?</li>
|
|
{% endif %}
|
|
<li><a href="{% url 'empty-registration' %}">Créer un compte</a></li>
|
|
</ul>
|