Re: [Django] #36080: Cleanup the inline link format. (was: Add a link to navigate to the object through str in the inline form.)

3 views
Skip to first unread message

Django

unread,
Jan 13, 2025, 7:49:11 PM1/13/25
to django-...@googlegroups.com
#36080: Cleanup the inline link format.
-------------------------------+--------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: New feature | Status: new
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: Inline, Link | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Antoliny):

* resolution: invalid =>
* status: closed => new
* summary: Add a link to navigate to the object through str in the inline
form. => Cleanup the inline link format.


Old description:

> It would be better if the current str of the object in the inline form,
> which is in a <p>, <span> tag, could be enhanced by adding a link through
> an <a> tag to navigate to the object.
> [[Image(inline_object_str_add_link.png)]]

New description:

when `show_change_link` is applied, the icon image appears slightly
cropped in `TabularInline`. Also, the Change and View text is applied
depending on the user's permissions, but the permission-related details
are already exposed in the form.
[[Image(tabular_inline_link.png)]]
Therefore, how about simply adding the link to the object's `__str__`?
[[Image(link_change_2.png)]]
I think it looks cleaner when the link is added to the `__str__`(removed
icon and text).
Additionally, what do you think about changing the default value of
show_change_link to True?
Changing it to True could also improve accessibility.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36080#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Reply all
Reply to author
Forward
0 new messages