kopia lustrzana https://github.com/wagtail/wagtail
Allow specifying icon on a dropdown button
rodzic
32caf644c0
commit
3ad7c54267
|
@ -1,6 +1,6 @@
|
|||
{% load wagtailadmin_tags %}
|
||||
{% fragment as toggle_classname %}{{ classes|join:' ' }} {{ button_classes|join:' ' }}{% endfragment %}
|
||||
|
||||
{% dropdown attrs=self.attrs toggle_icon="arrow-down" toggle_label=label toggle_aria_label=title toggle_classname=toggle_classname %}
|
||||
{% dropdown attrs=self.attrs toggle_icon=icon_name|default:"arrow-down" toggle_label=label toggle_aria_label=title toggle_classname=toggle_classname %}
|
||||
{% include "wagtailadmin/pages/listing/_dropdown_items.html" with buttons=buttons only %}
|
||||
{% enddropdown %}
|
||||
|
|
|
@ -266,12 +266,12 @@ def page_listing_buttons(page, page_perms, next_url=None):
|
|||
)
|
||||
|
||||
yield ButtonWithDropdownFromHook(
|
||||
_("More"),
|
||||
"",
|
||||
hook_name="register_page_listing_more_buttons",
|
||||
page=page,
|
||||
page_perms=page_perms,
|
||||
next_url=next_url,
|
||||
classes={"button", "button-secondary", "button-small"},
|
||||
icon_name="dots-horizontal",
|
||||
attrs={
|
||||
"target": "_blank",
|
||||
"rel": "noreferrer",
|
||||
|
|
|
@ -92,6 +92,7 @@ class BaseDropdownMenuButton(Button):
|
|||
"label": self.label,
|
||||
"title": self.attrs.get("title"),
|
||||
"classes": self.classes,
|
||||
"icon_name": self.icon_name,
|
||||
}
|
||||
|
||||
def render(self):
|
||||
|
|
Ładowanie…
Reference in New Issue