mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-11 03:59:41 +02:00
Merge branch 'main' into nl/3176-page-titles
This commit is contained in:
commit
d66bd5df67
13 changed files with 167 additions and 88 deletions
|
@ -2274,11 +2274,12 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
|||
@admin.display(description=_("Requested Domain"))
|
||||
def custom_requested_domain(self, obj):
|
||||
# Example: Show different icons based on `status`
|
||||
url = reverse("admin:registrar_domainrequest_changelist") + f"{obj.id}"
|
||||
text = obj.requested_domain
|
||||
if obj.portfolio:
|
||||
return format_html('<a href="{}"><img src="/public/admin/img/icon-yes.svg"> {}</a>', url, text)
|
||||
return format_html('<a href="{}">{}</a>', url, text)
|
||||
return format_html(
|
||||
f'<img class="padding-right-05" src="/public/admin/img/icon-yes.svg" aria-hidden="true">{escape(text)}'
|
||||
)
|
||||
return text
|
||||
|
||||
custom_requested_domain.admin_order_field = "requested_domain__name" # type: ignore
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue