Add support in datagrids to show content when the grid is empty.
Review Request #7046 — Created March 12, 2015 and submitted
Custom datagrid listview.html templates can now override a
datagrid_emptyblock 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.
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