Add support in datagrids to show content when the grid is empty.

Review Request #7046 — Created March 12, 2015 and submitted

Information

Djblets
release-0.8.x
0b6f383...

Reviewers

Custom datagrid listview.html templates can now override a
datagrid_empty block to display custom content when the datagrid is
empty. This is useful for displaying a message instead of an empty
datagrid, possibly with instructions on creating something.

The cell is wrapped in a row and cell with classes that can be styled
specially. These won't show the hover effect, like other datagrid rows.

By default, nothing is shown, for backwards-compatibility.

Made use of this in a change for Review Board. Saw my message when the
datagrid was empty, but not when populated.

reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        djblets/datagrid/templates/datagrid/listview.html
        djblets/static/djblets/css/datagrid.less
    
    
    
    Tool: Pyflakes
    Ignored Files:
        djblets/datagrid/templates/datagrid/listview.html
        djblets/static/djblets/css/datagrid.less
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.9.x (aaa9a5f)
Loading...