We already hit this problem in project_issue: #359122: Add an "Issue table" view style plugin to provide row coloring and the links at the top of the page
Now we need basically the identical solution for two other kinds of view tables:
A) #539682: Replace hard-coded release download table with a view -- we want to color the rows based on recommended vs. supported vs. -dev snapshots
B) #645066: Print info on recommended release for each project in the project_package_items view -- we want to color the rows based on the update status of each item
In fact, the release download table on the project pages for packaged profiles are going to need coloring by update_status, too...
Anyway, I'm loathe to just completely duplicate this, and add a bunch of different table style plugins. :( It'd be really nice to generalize this. Unfortunately, merlinofchaos says this is far off in Views itself, so a general solution there isn't in the cards, at least not for the short term. I'm not 100% sure how I want to handle this for the immediate future, but I wanted to open an issue to have a place to discuss it.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 645074-3.conditional_row_colors.png | 59.72 KB | dww |
Comments
Comment #1
dwwForgot to tag
Comment #2
dwwActually, (A) is no longer true. We're now using separate tables for recommended vs. supported vs. dev., and we're doing the color for non-recommended and -dev table-wide without any fancy conditional stuff based on view field values. So, at this point, the only thing we need the fancy conditional behavior for is the update_status field. That makes me feel less dirty about just adding our own "Project release table" style plugin in the short term, until Views itself has a more general solution.
Comment #3
dwwIt's a bit of a hack, but it's all working: http://drupal.org/cvs?commit=296052