K-Fêt autocompletion shows the 'new user' link

This commit is contained in:
Martin Pépin 2020-09-07 11:32:28 +02:00
parent 34be9e2393
commit 3da0a613f7
No known key found for this signature in database
GPG key ID: E7520278B1774448
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{% extends "shared/search_results.html" %}
{% load i18n %}
{% block extra_section %}
<li class="autocomplete-header">
{% if not results %}
<span class="autocomplete-item">
{% trans "Aucune correspondance trouvée" %}
</span>
{% else %}
<span class="autocomplete-item">
{% trans "Pas dans la liste ?" %}
</span>
{% endif %}
</li>
<li class="autocomplete-new">
<a class="autocomplete-item" href="{% url "kfet.account.create.empty" %}">
{% trans "Créer un compte" %}
</a>
</li>
{% endblock %}

View file

@ -2596,6 +2596,7 @@ class ArticleStatSales(ScaleMixin, JSONDetailView):
class AccountCreateAutocompleteView(PermissionRequiredMixin, AutocompleteView):
template_name = "kfet/search_results.html"
permission_required = "kfet.is_team"
search_composer = kfet_autocomplete