mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 17:47:02 +02:00
fix unsortable custom columns, fix font-size discrepancy on fixed buttons, lint
This commit is contained in:
parent
2df68d4b52
commit
2dd6bc6f05
2 changed files with 8 additions and 1 deletions
|
@ -200,6 +200,10 @@ class DomainAdmin(ListHeaderAdmin):
|
||||||
def organization_type(self, obj):
|
def organization_type(self, obj):
|
||||||
return obj.domain_info.organization_type
|
return obj.domain_info.organization_type
|
||||||
|
|
||||||
|
organization_type.admin_order_field = ( # type: ignore
|
||||||
|
"domain_info__organization_type"
|
||||||
|
)
|
||||||
|
|
||||||
# Filters
|
# Filters
|
||||||
list_filter = ["domain_info__organization_type"]
|
list_filter = ["domain_info__organization_type"]
|
||||||
|
|
||||||
|
@ -265,7 +269,7 @@ class ContactAdmin(ListHeaderAdmin):
|
||||||
# is not allowing a short_description attr on it
|
# is not allowing a short_description attr on it
|
||||||
# This gets around the linter limitation, for now.
|
# This gets around the linter limitation, for now.
|
||||||
def contact(self, obj: models.Contact):
|
def contact(self, obj: models.Contact):
|
||||||
""" Duplicate the contact _str_"""
|
"""Duplicate the contact _str_"""
|
||||||
if obj.first_name or obj.last_name:
|
if obj.first_name or obj.last_name:
|
||||||
return obj.get_formatted_name()
|
return obj.get_formatted_name()
|
||||||
elif obj.email:
|
elif obj.email:
|
||||||
|
@ -275,6 +279,8 @@ class ContactAdmin(ListHeaderAdmin):
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
contact.admin_order_field = "first_name" # type: ignore
|
||||||
|
|
||||||
|
|
||||||
class WebsiteAdmin(ListHeaderAdmin):
|
class WebsiteAdmin(ListHeaderAdmin):
|
||||||
"""Custom website admin class."""
|
"""Custom website admin class."""
|
||||||
|
|
|
@ -163,6 +163,7 @@ table > caption > span {
|
||||||
.delete-confirmation form .cancel-link,
|
.delete-confirmation form .cancel-link,
|
||||||
.submit-row a.closelink {
|
.submit-row a.closelink {
|
||||||
height: auto!important;
|
height: auto!important;
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep th from collapsing
|
// Keep th from collapsing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue