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.
Working on the design of Drupal Commerce, I ran into #1029638: Display empty text messages for main listing Views in tables.
In Drupal 7 we have introduced the concept of empty table messages, and made an effort for consistency to provide tables when there is no content. The reason behind this is that we give users an "idea" what will happen when you add an item (whatever that may be).
Since more and more modules will start leveraging Views to build administrative interfaces, it will be useful if Views provides the ability to do this.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1029654-empty_text-table.patch | 4.35 KB | dawehner |
empty-table-message-views-implement.png | 10.47 KB | Bojhan |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedAgreed. No reason not do to this for 6.x-3.x as well.
Comment #2
dawehnerAnd here is a patch.
Added a new api function so hide the result via a function of the style plugin. It's even a bit cleaner from my perspective.
Comment #3
webadpro CreditAttribution: webadpro commentedWill this patch be coded for version2 also?
Comment #4
merlinofchaos CreditAttribution: merlinofchaos commentedSorry, this won't be committed to 2.x.
Committed to 6.x-3.x. Doesn't apply to 7.x-3.x and I tried a manual bit of porting but things look sufficinetly different that I stopped.
Comment #5
dawehnerCommited to 7.x-3.x
Comment #7
webadpro CreditAttribution: webadpro commentedI have finally made the changes to get it working in Views 2.
Some minor changes needs to be done from the patch but nothing big.
Cheers