kopia lustrzana https://github.com/wagtail/wagtail
applied new styles to delete button in user + ModelAdmin listings
rodzic
0e21d2e239
commit
e3499e8e31
wagtail
|
@ -7,8 +7,8 @@ class ButtonHelper:
|
|||
|
||||
default_button_classnames = ["button"]
|
||||
add_button_classnames = ["bicolor", "icon", "icon-plus"]
|
||||
inspect_button_classnames = []
|
||||
edit_button_classnames = []
|
||||
inspect_button_classnames = ["button-secondary"]
|
||||
edit_button_classnames = ["button-secondary"]
|
||||
delete_button_classnames = ["no"]
|
||||
|
||||
def __init__(self, view, request):
|
||||
|
|
|
@ -406,7 +406,7 @@ class IndexView(SpreadsheetExportMixin, WMABaseView):
|
|||
|
||||
def get_buttons_for_obj(self, obj):
|
||||
return self.button_helper.get_buttons_for_obj(
|
||||
obj, classnames_add=["button-small", "button-secondary"]
|
||||
obj, classnames_add=["button-small"]
|
||||
)
|
||||
|
||||
def get_search_results(self, request, queryset, search_term):
|
||||
|
|
|
@ -139,6 +139,7 @@ def user_listing_buttons(context, user):
|
|||
yield UserListingButton(
|
||||
_("Edit"),
|
||||
reverse("wagtailusers_users:edit", args=[user.pk]),
|
||||
classes={"button-secondary"},
|
||||
attrs={"title": _("Edit this user")},
|
||||
priority=10,
|
||||
)
|
||||
|
|
|
@ -3,5 +3,5 @@ from wagtail.admin.widgets import Button
|
|||
|
||||
class UserListingButton(Button):
|
||||
def __init__(self, label, url, classes=set(), **kwargs):
|
||||
classes = {"button", "button-small", "button-secondary"} | set(classes)
|
||||
classes = {"button", "button-small"} | set(classes)
|
||||
super().__init__(label, url, classes=classes, **kwargs)
|
||||
|
|
Ładowanie…
Reference in New Issue