mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Add alert role to search results (#5777)
* Add alert role to Page, Documents and Images search results * Add alert role to Choosers, Users, Groups and Redirects search results
This commit is contained in:
parent
1547777a9b
commit
53d2259fbe
@ -1,6 +1,6 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=pages.paginator.count %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
<div class="nice-padding">
|
||||
{% if pages %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=all_pages.count %}
|
||||
There is one matching page
|
||||
{% plural %}
|
||||
@ -38,7 +38,7 @@
|
||||
{% paginate pages base_url=pagination_base_url %}
|
||||
{% else %}
|
||||
{% if query_string %}
|
||||
<h2>{% blocktrans %}Sorry, no pages match <em>"{{ query_string }}"</em>{% endblocktrans %}</h2>
|
||||
<h2 role="alert">{% blocktrans %}Sorry, no pages match <em>"{{ query_string }}"</em>{% endblocktrans %}</h2>
|
||||
|
||||
{% search_other %}
|
||||
{% else %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% if redirects %}
|
||||
{% if query_string %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=redirects.paginator.count %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
@ -15,7 +15,7 @@
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=redirects linkurl="wagtailredirects:index" %}
|
||||
{% else %}
|
||||
{% if query_string %}
|
||||
<p>{% blocktrans %}Sorry, no redirects match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
<p role="alert">{% blocktrans %}Sorry, no redirects match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
{% url 'wagtailredirects:add' as wagtailredirects_add_redirect_url %}
|
||||
<p>{% blocktrans %}No redirects have been created. Why not <a href="{{ wagtailredirects_add_redirect_url }}">add one</a>?{% endblocktrans %}</p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% if queries %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=queries|length %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
@ -15,7 +15,7 @@
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=queries linkurl="wagtailsearchpromotions:index" %}
|
||||
{% else %}
|
||||
{% if is_searching %}
|
||||
<p>{% blocktrans %}Sorry, no promoted results match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
<p role="alert">{% blocktrans %}Sorry, no promoted results match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
{% url 'wagtailsearchpromotions:add' as wagtailsearchpromotions_add_url %}
|
||||
<p>{% blocktrans %}No promoted results have been created. Why not <a href="{{ wagtailsearchpromotions_add_url }}">add one</a>?{% endblocktrans %}</p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% if documents %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=documents.paginator.count %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
@ -17,7 +17,7 @@
|
||||
{% include "wagtailadmin/shared/ajax_pagination_nav.html" with items=documents %}
|
||||
{% else %}
|
||||
{% if documents_exist %}
|
||||
<p>{% blocktrans %}Sorry, no documents match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
<p role="alert">{% blocktrans %}Sorry, no documents match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<p>
|
||||
{% if collection_id %}
|
||||
|
@ -1,14 +1,14 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
{% if documents %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=documents|length %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
There are {{ counter }} matches
|
||||
{% endblocktrans %}
|
||||
</h2>
|
||||
|
||||
|
||||
{% search_other %}
|
||||
{% endif %}
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=documents %}
|
||||
{% else %}
|
||||
{% if is_searching %}
|
||||
<h2>{% blocktrans %}Sorry, no documents match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
|
||||
|
||||
<h2 role="alert">{% blocktrans %}Sorry, no documents match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
|
||||
|
||||
{% search_other %}
|
||||
{% else %}
|
||||
{% url 'wagtaildocs:add_multiple' as wagtaildocs_add_document_url %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load i18n %}
|
||||
{% if images %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=images.paginator.count %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load i18n %}
|
||||
{% if images %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=images.paginator.count %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
{% else %}
|
||||
{% if is_searching %}
|
||||
<h2>{% blocktrans %}Sorry, no images match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
|
||||
<h2 role="alert">{% blocktrans %}Sorry, no images match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
|
||||
|
||||
{% search_other %}
|
||||
{% else %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% if items %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=items.paginator.count %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
@ -15,7 +15,7 @@
|
||||
{% include "wagtailadmin/shared/ajax_pagination_nav.html" with items=items %}
|
||||
{% else %}
|
||||
{% if is_searching %}
|
||||
<p>{% blocktrans %}Sorry, no snippets match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
<p role="alert">{% blocktrans %}Sorry, no snippets match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
{% url 'wagtailsnippets:add' model_opts.app_label model_opts.model_name as wagtailsnippets_create_snippet_url %}
|
||||
<p>{% blocktrans with snippet_type_name=model_opts.verbose_name %}You haven't created any {{ snippet_type_name }} snippets. Why not <a href="{{ wagtailsnippets_create_snippet_url }}" target="_blank" rel="noopener noreferrer">create one now</a>?{% endblocktrans %}</p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% if items %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=items.paginator.count %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
@ -16,7 +16,7 @@
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=items linkurl=wagtailsnippets_list_url %}
|
||||
{% else %}
|
||||
{% if is_searching %}
|
||||
<p>{% blocktrans %}Sorry, no snippets match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
<p role="alert">{% blocktrans %}Sorry, no snippets match "<em>{{ query_string }}</em>"{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
{% url 'wagtailsnippets:add' model_opts.app_label model_opts.model_name as wagtailsnippets_create_url %}
|
||||
<p class="no-results-message">{% blocktrans with snippet_type_name_plural=model_opts.verbose_name_plural %}No {{ snippet_type_name_plural }} have been created. Why not <a href="{{ wagtailsnippets_create_url }}">add one</a>?{% endblocktrans %}</p>
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=page_obj linkurl="wagtailusers_groups:index" %}
|
||||
{% elif is_searching %}
|
||||
<p>{% blocktrans with query=search_form.q.value %}Sorry, no groups match "{{ query }}"{% endblocktrans %}</p>
|
||||
<p role="alert">{% blocktrans 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 %}There are no groups configured. Why not <a href="{{ wagtailusers_create_group_url }}">add some</a>?{% endblocktrans %}</p>
|
||||
|
@ -1,14 +1,14 @@
|
||||
{% load i18n wagtailadmin_tags %}
|
||||
{% if users %}
|
||||
{% if is_searching %}
|
||||
<h2>
|
||||
<h2 role="alert">
|
||||
{% blocktrans count counter=users|length %}
|
||||
There is {{ counter }} match
|
||||
{% plural %}
|
||||
There are {{ counter }} matches
|
||||
{% endblocktrans %}
|
||||
</h2>
|
||||
|
||||
|
||||
{% search_other %}
|
||||
{% endif %}
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
{% include "wagtailadmin/shared/pagination_nav.html" with items=users linkurl="wagtailusers_users:index" %}
|
||||
{% else %}
|
||||
{% if is_searching %}
|
||||
<h2>{% blocktrans %}Sorry, no users match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
|
||||
|
||||
<h2 role="alert">{% blocktrans %}Sorry, no users match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
|
||||
|
||||
{% search_other %}
|
||||
{% else %}
|
||||
{% url 'wagtailusers_create' as wagtailusers_create_url %}
|
||||
|
Loading…
Reference in New Issue
Block a user