Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#15290 closed (fixed)

Border style issue in changelist

Reported by: julien 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 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by julien

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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 5 years ago by russellm

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 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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