mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-24 08:34:49 +00:00
is_restricted -> page_types_restricted. missing space added
This commit is contained in:
parent
8c1881bee4
commit
53d3afe8df
3 changed files with 6 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% if is_restricted %}
|
||||
{% if page_types_restricted %}
|
||||
<p class="help-block help-warning">
|
||||
{% blocktrans with type=page_type.get_verbose_name %}
|
||||
Only pages of type "{{ type }}" may be chosen for this field. Search results will exclude pages of other types.
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
{% endif %}
|
||||
|
||||
{% if pages %}
|
||||
{% if is_searching%}
|
||||
{% if is_searching %}
|
||||
{% include "wagtailadmin/pages/list.html" with choosing=1 show_parent=1 pages=pages parent_page=parent_page %}
|
||||
{% else %}
|
||||
{% include "wagtailadmin/pages/list.html" with choosing=1 allow_navigation=1 orderable=0 pages=pages parent_page=parent_page %}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{% load i18n %}
|
||||
{% if is_restricted %}
|
||||
{% if page_types_restricted %}
|
||||
{% trans "Choose" as choose_str %}
|
||||
{% trans page_type.get_verbose_name as subtitle %}
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ def browse(request, parent_page_id=None):
|
|||
content_type_app_name, content_type_model_name = page_type.split('.')
|
||||
|
||||
is_searching = False
|
||||
is_restricted = page_type != 'wagtailcore.page'
|
||||
page_types_restricted = page_type != 'wagtailcore.page'
|
||||
|
||||
try:
|
||||
content_type = ContentType.objects.get_by_natural_key(content_type_app_name, content_type_model_name)
|
||||
|
|
@ -72,7 +72,7 @@ def browse(request, parent_page_id=None):
|
|||
'is_searching': is_searching,
|
||||
'page_type_string': page_type,
|
||||
'page_type': desired_class,
|
||||
'is_restricted': is_restricted
|
||||
'page_types_restricted': page_types_restricted
|
||||
})
|
||||
|
||||
return render_modal_workflow(request, 'wagtailadmin/chooser/browse.html', 'wagtailadmin/chooser/browse.js', {
|
||||
|
|
@ -85,7 +85,7 @@ def browse(request, parent_page_id=None):
|
|||
'is_searching': False,
|
||||
'page_type_string': page_type,
|
||||
'page_type': desired_class,
|
||||
'is_restricted': is_restricted
|
||||
'page_types_restricted': page_types_restricted
|
||||
})
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue