Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#15290 closed (fixed)

Border style issue in changelist

Reported by: Julien Phalip Owned by: nobody
Component: contrib.admin Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Take this example:

Model:

from django.db import models

class MyModel(models.Model):
    name = models.CharField(max_length=100, blank=True)
    title = models.CharField(max_length=100, blank=True)
    content = models.CharField(max_length=100, blank=True)

Admin:

from django.contrib import admin

from .models import MyModel

class MyModelAdmin(admin.ModelAdmin):
    list_display = ('name', 'title', 'content')
    list_display_links = ('title',)

admin.site.register(MyModel, MyModelAdmin)

The display link (here the 'title' field) is represented within a <th> instead of a <td> which is used for other regular display fields. The issue is that there is no CSS rule for displaying the left border of a <th> cell. The attached patch fixes this.

Attachments (1)

15290_changelist_th_css.diff (627 bytes) - added by Julien Phalip 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Julien Phalip

comment:1 Changed 6 years ago by Russell Keith-Magee

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

In [15572]:

Fixed #15290 -- Fixed a CSS styling issue with borders when the link item in a changelist isn't the first item in the list_display. Thanks to Julien Phalip for the report and patch.

comment:3 Changed 6 years ago by Russell Keith-Magee

In [15576]:

[1.2.X] Fixed #15290 -- Fixed a CSS styling issue with borders when the link item in a changelist isn't the first item in the list_display. Thanks to Julien Phalip for the report and patch.

Backport of r15572 from trunk.

comment:4 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top