Code

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#11057 closed (fixed)

No actions in admin (actions=None) messes up layout.

Reported by: rvdrijst Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: actions=None actions admin style
Cc: rvdrijst@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When a changelist page on the admin has no actions to display and therefore no checkboxes to put in the first column of each row, the layout of the columns is mangled. This is because the styles in changelists.css use the first-child selector and set the width of that first column to 1.5em. This is fine when it is indeed a checkbox column, but makes it rather difficult to fit in text of any reasonable size when it is not.

The attached patch solves the problem by setting a special class attribute 'action-checkbox-column' on the header for the action checkboxes and the width of 1.5em only applies to that class. There are also two simple tests.

This bug arises because of an incomplete implementation of ticket #10595.

Attachments (1)

actions_patch.diff (2.3 KB) - added by rvdrijst 5 years ago.
Patch with fix and tests

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by rvdrijst

Patch with fix and tests

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by jacob

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

(In [11670]) Fixed #11057: having no actions in the admin (actions=None) no longer messes up the layout. Thanks, rvdrijst.

comment:3 Changed 4 years ago by jacob

(In [11671]) [1.1.X] Fixed #11057: having no actions in the admin (actions=None) no longer messes up the layout. Thanks, rvdrijst.

Backport of [11670] from trunk.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.