It would be cool to hide a full column if each row has an empty output.
Some use cases would be node edit/delete links.
I think this could be an option on the table style, but has to be configured to be disabled by default.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | interdiff.txt | 974 bytes | tim.plunkett |
| #19 | 1135002-views-19.patch | 2.58 KB | tim.plunkett |
| #18 | 1135002-views-18.patch | 2.58 KB | tim.plunkett |
| #11 | 1135002-hide-empty_column_6.x-2-x_0.patch | 2.58 KB | john franklin |
| #6 | 1135002-hide-empty_column.patch | 2.71 KB | bojanz |
Comments
Comment #1
hydra commentedthis would be a great feature!
Comment #2
areikiera commented+1 subscribe
Comment #3
hydra commentedAs long as this feature isn't part of views 3 the #1 solution in #313551: Add Ability to Hide Empty "Edit link" Table Column works for me!
Comment #4
dawehnerThe space available in the table setting seems to be too much, if this field is added.
Here is a patch for the feature itself, it works fine already.
Comment #5
bojanz commentedCode looks code and works as advertised.
My only nitpick is that "Hide empty column" is not centered (the checkboxes are not in the middle like for "Sortable"), even though the patch specifies the correct align..
Comment #6
bojanz commentedMade it centered. I'm gonna go ahead and mark this as RTBC.
Comment #7
dawehnerOMG someone tests/reviews patches :) Huge kudos for this.
Commited to 7.x-3.x
This might be worth to backport to 6.x-3.x
Comment #8
prasannah.ganeshan commentedhas this been implemented into Drupal 7 yet. I need this really desperately.
Comment #9
bojanz commented@prasannah.ganeshan
It's in 7.x-3.x-dev, as reading comment #7 would have told you.
Comment #10
healycn commentedsubscribe
Comment #11
john franklin commentedHere is a patch that applies against 6.x-2.16. (Why this version? 'Cause it's what I needed.) The previous patch applied with some offsets and fuzz. One hunk failed (includes/admin.inc #2), but I couldn't tell you why. It looked clean to me and applying it by hand was trivial enough.
Comment #12
dawehnerThis late it doesn't really make sense to commit to 6.x-2.x
Comment #13
john franklin commentedAgreed. The 6.x-2.x version tag makes it clear what that patch was based off of. I wanted to make it available to those of us still running 2.x and in need of this feature, even if it is an unsupported patch.
Comment #14
dreamer777 commentedI tried the #11 patch for Views 6-2.16, but it does not work. Is there any restrictions when the Views PHP custom field is used?
Comment #16
sergiu.popa commentedI've applied patch #11 and it works with version 6.x-2.16. Thank you John Franklin
Comment #17
john franklin commented@dreamer777 -- sorry, I don't use Views PHP, I have no idea.
Comment #18
tim.plunkettThis is rerolled for 6.x-3.x, works great.
Comment #19
tim.plunkettOne problem. We can't use those variable names, they're in the outer loop.
Comment #20
izmeez commentedPatch in #11 applies without difficulty to latest views-6.x-2.26
Comment #21
chris matthews commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue