forked from DGNum/gestioCOF
K-Fêt autocompletion shows the 'new user' link
This commit is contained in:
parent
34be9e2393
commit
3da0a613f7
2 changed files with 22 additions and 0 deletions
21
kfet/templates/kfet/search_results.html
Normal file
21
kfet/templates/kfet/search_results.html
Normal 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 %}
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue