kopia lustrzana https://github.com/wagtail/wagtail
Move template paths from edit_handlers to panels
rodzic
c7774ba0be
commit
6bb26c774e
|
@ -13,5 +13,5 @@ wagtail/search/static
|
||||||
wagtail/snippets/static
|
wagtail/snippets/static
|
||||||
wagtail/users/static
|
wagtail/users/static
|
||||||
wagtail/contrib/*/static
|
wagtail/contrib/*/static
|
||||||
wagtail/admin/templates/wagtailadmin/edit_handlers/inline_panel.js
|
wagtail/admin/templates/wagtailadmin/panels/inline_panel.js
|
||||||
wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js
|
wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js
|
||||||
|
|
|
@ -11,5 +11,5 @@ _build
|
||||||
*.md
|
*.md
|
||||||
# Files which contain incompatible syntax.
|
# Files which contain incompatible syntax.
|
||||||
*.html
|
*.html
|
||||||
wagtail/admin/templates/wagtailadmin/edit_handlers/inline_panel.js
|
wagtail/admin/templates/wagtailadmin/panels/inline_panel.js
|
||||||
wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js
|
wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js
|
||||||
|
|
|
@ -114,7 +114,7 @@ FieldRowPanel
|
||||||
HelpPanel
|
HelpPanel
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
.. class:: HelpPanel(content='', template='wagtailadmin/edit_handlers/help_panel.html', heading='', classname='')
|
.. class:: HelpPanel(content='', template='wagtailadmin/panels/help_panel.html', heading='', classname='')
|
||||||
|
|
||||||
.. attribute:: HelpPanel.content
|
.. attribute:: HelpPanel.content
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"static",
|
"static",
|
||||||
// Files with template syntax.
|
// Files with template syntax.
|
||||||
"wagtail/admin/templates/wagtailadmin/edit_handlers/inline_panel.js",
|
"wagtail/admin/templates/wagtailadmin/panels/inline_panel.js",
|
||||||
"wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js"
|
"wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -401,7 +401,7 @@ class BaseFormEditHandler(BaseCompositeEditHandler):
|
||||||
|
|
||||||
|
|
||||||
class TabbedInterface(BaseFormEditHandler):
|
class TabbedInterface(BaseFormEditHandler):
|
||||||
template = "wagtailadmin/edit_handlers/tabbed_interface.html"
|
template = "wagtailadmin/panels/tabbed_interface.html"
|
||||||
|
|
||||||
def __init__(self, *args, show_comments_toggle=None, **kwargs):
|
def __init__(self, *args, show_comments_toggle=None, **kwargs):
|
||||||
self.base_form_class = kwargs.pop("base_form_class", None)
|
self.base_form_class = kwargs.pop("base_form_class", None)
|
||||||
|
@ -431,11 +431,11 @@ class TabbedInterface(BaseFormEditHandler):
|
||||||
|
|
||||||
|
|
||||||
class ObjectList(TabbedInterface):
|
class ObjectList(TabbedInterface):
|
||||||
template = "wagtailadmin/edit_handlers/object_list.html"
|
template = "wagtailadmin/panels/object_list.html"
|
||||||
|
|
||||||
|
|
||||||
class FieldRowPanel(BaseCompositeEditHandler):
|
class FieldRowPanel(BaseCompositeEditHandler):
|
||||||
template = "wagtailadmin/edit_handlers/field_row_panel.html"
|
template = "wagtailadmin/panels/field_row_panel.html"
|
||||||
|
|
||||||
def on_instance_bound(self):
|
def on_instance_bound(self):
|
||||||
super().on_instance_bound()
|
super().on_instance_bound()
|
||||||
|
@ -449,7 +449,7 @@ class FieldRowPanel(BaseCompositeEditHandler):
|
||||||
|
|
||||||
|
|
||||||
class MultiFieldPanel(BaseCompositeEditHandler):
|
class MultiFieldPanel(BaseCompositeEditHandler):
|
||||||
template = "wagtailadmin/edit_handlers/multi_field_panel.html"
|
template = "wagtailadmin/panels/multi_field_panel.html"
|
||||||
|
|
||||||
def classes(self):
|
def classes(self):
|
||||||
classes = super().classes()
|
classes = super().classes()
|
||||||
|
@ -461,7 +461,7 @@ class HelpPanel(EditHandler):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
content="",
|
content="",
|
||||||
template="wagtailadmin/edit_handlers/help_panel.html",
|
template="wagtailadmin/panels/help_panel.html",
|
||||||
heading="",
|
heading="",
|
||||||
classname="",
|
classname="",
|
||||||
):
|
):
|
||||||
|
@ -557,7 +557,7 @@ class FieldPanel(EditHandler):
|
||||||
else:
|
else:
|
||||||
return not self.disable_comments
|
return not self.disable_comments
|
||||||
|
|
||||||
object_template = "wagtailadmin/edit_handlers/single_field_panel.html"
|
object_template = "wagtailadmin/panels/single_field_panel.html"
|
||||||
|
|
||||||
def render_as_object(self):
|
def render_as_object(self):
|
||||||
return mark_safe(
|
return mark_safe(
|
||||||
|
@ -575,7 +575,7 @@ class FieldPanel(EditHandler):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
field_template = "wagtailadmin/edit_handlers/field_panel_field.html"
|
field_template = "wagtailadmin/panels/field_panel_field.html"
|
||||||
|
|
||||||
def render_as_field(self):
|
def render_as_field(self):
|
||||||
return mark_safe(
|
return mark_safe(
|
||||||
|
@ -827,7 +827,7 @@ class InlinePanel(EditHandler):
|
||||||
instance=empty_form.instance, request=self.request, form=empty_form
|
instance=empty_form.instance, request=self.request, form=empty_form
|
||||||
)
|
)
|
||||||
|
|
||||||
template = "wagtailadmin/edit_handlers/inline_panel.html"
|
template = "wagtailadmin/panels/inline_panel.html"
|
||||||
|
|
||||||
def render(self):
|
def render(self):
|
||||||
formset = render_to_string(
|
formset = render_to_string(
|
||||||
|
@ -840,7 +840,7 @@ class InlinePanel(EditHandler):
|
||||||
js = self.render_js_init()
|
js = self.render_js_init()
|
||||||
return widget_with_script(formset, js)
|
return widget_with_script(formset, js)
|
||||||
|
|
||||||
js_template = "wagtailadmin/edit_handlers/inline_panel.js"
|
js_template = "wagtailadmin/panels/inline_panel.js"
|
||||||
|
|
||||||
def render_js_init(self):
|
def render_js_init(self):
|
||||||
return mark_safe(
|
return mark_safe(
|
||||||
|
@ -927,10 +927,8 @@ class CommentPanel(EditHandler):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template = "wagtailadmin/edit_handlers/comments/comment_panel.html"
|
template = "wagtailadmin/panels/comments/comment_panel.html"
|
||||||
declarations_template = (
|
declarations_template = "wagtailadmin/panels/comments/comment_declarations.html"
|
||||||
"wagtailadmin/edit_handlers/comments/comment_declarations.html"
|
|
||||||
)
|
|
||||||
|
|
||||||
def html_declarations(self):
|
def html_declarations(self):
|
||||||
return render_to_string(self.declarations_template)
|
return render_to_string(self.declarations_template)
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% for child in self.children %}
|
{% for child in self.children %}
|
||||||
{% include "wagtailadmin/edit_handlers/inline_panel_child.html" %}
|
{% include "wagtailadmin/panels/inline_panel_child.html" %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<script type="text/django-form-template" id="id_{{ self.formset.prefix }}-EMPTY_FORM_TEMPLATE">
|
<script type="text/django-form-template" id="id_{{ self.formset.prefix }}-EMPTY_FORM_TEMPLATE">
|
||||||
{% escapescript %}
|
{% escapescript %}
|
||||||
{% include "wagtailadmin/edit_handlers/inline_panel_child.html" with child=self.empty_child %}
|
{% include "wagtailadmin/panels/inline_panel_child.html" with child=self.empty_child %}
|
||||||
{% endescapescript %}
|
{% endescapescript %}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -6,7 +6,7 @@ from wagtail.admin.panels import EditHandler
|
||||||
|
|
||||||
|
|
||||||
class FormSubmissionsPanel(EditHandler):
|
class FormSubmissionsPanel(EditHandler):
|
||||||
template = "wagtailforms/edit_handlers/form_responses_panel.html"
|
template = "wagtailforms/panels/form_responses_panel.html"
|
||||||
|
|
||||||
def render(self):
|
def render(self):
|
||||||
form_page_model = self.model
|
form_page_model = self.model
|
||||||
|
|
Ładowanie…
Reference in New Issue