0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Use add_url for no-results messages on groups/users

This commit is contained in:
Matt Westcott 2023-06-09 13:49:23 +01:00
parent d812767715
commit da966ad04b
2 changed files with 3 additions and 5 deletions

View File

@ -5,7 +5,6 @@
{% if is_searching %}
<p role="alert">{% blocktrans trimmed with query=search_form.q.value %}Sorry, no groups match "{{ query }}"{% endblocktrans %}</p>
{% else %}
{% url 'wagtailusers_groups:add' as wagtailusers_create_group_url %}
<p>{% blocktrans trimmed %}There are no groups configured. Why not <a href="{{ wagtailusers_create_group_url }}">add some</a>?{% endblocktrans %}</p>
<p>{% blocktrans trimmed with wagtailusers_create_group_url=add_url %}There are no groups configured. Why not <a href="{{ wagtailusers_create_group_url }}">add some</a>?{% endblocktrans %}</p>
{% endif %}
{% endblock %}

View File

@ -22,13 +22,12 @@
{% search_other %}
{% else %}
{% url 'wagtailusers_users:add' as wagtailusers_add_url %}
{% if group %}
{% with group.name as group_name %}
<p>{% blocktrans trimmed %}The {{ group_name }} group has no users configured. Why not <a href="{{ wagtailusers_add_url }}">add some</a>?{% endblocktrans %}</p>
<p>{% blocktrans trimmed with wagtailusers_add_url=add_url %}The {{ group_name }} group has no users configured. Why not <a href="{{ wagtailusers_add_url }}">add some</a>?{% endblocktrans %}</p>
{% endwith %}
{% else %}
<p>{% blocktrans trimmed %}There are no users configured. Why not <a href="{{ wagtailusers_add_url }}">add some</a>?{% endblocktrans %}</p>
<p>{% blocktrans trimmed with wagtailusers_add_url=add_url %}There are no users configured. Why not <a href="{{ wagtailusers_add_url }}">add some</a>?{% endblocktrans %}</p>
{% endif %}
{% endif %}
{% endif %}