In line with other UIs of this type (eg, "No comments available."), when there are no views at all, there should be a single row to state this.

CommentFileSizeAuthor
#2 1102024.ctools.admin-list-empty-rows.patch829 bytesjoachim
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

merlinofchaos’s picture

Since Views comes with 6 or 7 default views, how can there ever be no views available? Oh I guess if you're filtering.

joachim’s picture

Project: Views (for Drupal 7) » Chaos Tool Suite (ctools)
Version: 7.x-3.x-dev » 7.x-1.x-dev
Status: Active » Needs review
FileSize
829 bytes

This is actually made in Ctools (though I'm not sure it's being made in the intended place -- see #1102038: class class views_ui extends ctools_export_ui not being used).

Here is a patch, although in the list_render() function $this has absolutely no data (all object properties are NULL) so the message is pretty generic as there's no way I can see of finding out what types of stuff we're listing.

merlinofchaos’s picture

+          'colspan' => 3,

Should count($header) instead.

merlinofchaos’s picture

In D7, there is now a 'empty' key you can pass to theme('table'). Should use that instead.

merlinofchaos’s picture

It should also try to use the actual name of the item (we keep it) plus allow for a standard string override from the plugin.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed a fix that uses 'empty' for the table and $this->plugins['strings']['message']['no items'] which is filled in via the process.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.