Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1102024.ctools.admin-list-empty-rows.patch | 829 bytes | joachim |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedSince Views comes with 6 or 7 default views, how can there ever be no views available? Oh I guess if you're filtering.
Comment #2
joachim CreditAttribution: joachim commentedThis 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.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedShould count($header) instead.
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedIn D7, there is now a 'empty' key you can pass to theme('table'). Should use that instead.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedIt should also try to use the actual name of the item (we keep it) plus allow for a standard string override from the plugin.
Comment #6
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted a fix that uses 'empty' for the table and $this->plugins['strings']['message']['no items'] which is filled in via the process.