What are the plans for bringing Views Table Group to Drupal 7?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acolyte26’s picture

I would also really love to have this ported to Drupal 7. If anyone knows of other similar modules, please let me know.

gmak’s picture

Me too

Blackice2999’s picture

working on it. patch will follow

Blackice2999’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
8.04 KB

please try this patch

becw’s picture

Assigned: Unassigned » becw

Thanks! I guess I should check this out :)

cutmedia’s picture

working on Views 3, D7.7.

acolyte26’s picture

The patch works but I am receiving some errors: the error is as follows:

    Notice: Undefined index: test: 10:00 am to 11:00 am in tablegroup_plugin_style_tablegroup->render() (line 132 of /home/prashant/src/htdocs/msnet/sites/all/modules/tablegroup/tablegroup_plugin_style_tablegroup.inc).
    Notice: Undefined index: test2: Room A in tablegroup_plugin_style_tablegroup->render() (line 132 of /home/prashant/src/htdocs/msnet/sites/all/modules/tablegroup/tablegroup_plugin_style_tablegroup.inc).
    Notice: Undefined index: test2: Room B in tablegroup_plugin_style_tablegroup->render() (line 132 of /home/prashant/src/htdocs/msnet/sites/all/modules/tablegroup/tablegroup_plugin_style_tablegroup.inc).
    Notice: Undefined index: test: 11:00 am to 12:00 pm in tablegroup_plugin_style_tablegroup->render() (line 132 of /home/prashant/src/htdocs/msnet/sites/all/modules/tablegroup/tablegroup_plugin_style_tablegroup.inc).
    Notice: Undefined index: test2: Room A in tablegroup_plugin_style_tablegroup->render() (line 132 of /home/prashant/src/htdocs/msnet/sites/all/modules/tablegroup/tablegroup_plugin_style_tablegroup.inc).
    Notice: Undefined index: test2: Room B in tablegroup_plugin_style_tablegroup->render() (line 132 of /home/prashant/src/htdocs/msnet/sites/all/modules/tablegroup/tablegroup_plugin_style_tablegroup.inc).
kaizerking’s picture

Is there any update on this patch? s it working?

FranckV’s picture

First of all thank you for this simple yet very powerful module. It solved a very "common" problem : showing a timeline.
What is the status with regards to porting this functionality to Drupal 7 ? Any clue how to do the same on D 7 ?

pmusaraj’s picture

I tried the patch and it is working well.
When patching, it failed to modify the .info file, likely because it requires the site to be in a git repo.

yannickoo’s picture

I cloned the git repo and manually customized the code due the patch from #4 and recreated a patch. Blackice2999 did customize the code in a non-drupal-way.

antiorario’s picture

#11 had a bunch of errors in the code (wrong closing brackets, one missing semicolon), and in tablegroup.module the function theme_tablegroup_item() wasn't producing content because it was using $item instead of $variables['item']. I also added an existence check for cell content around line 120 of tablegroup_plugin_style_tablegroup.inc, otherwise previously undeclared cells would throw an error.

The patch will fail for the .info file—this is completely normal. The .info file contained in the git repo is different from the one packaged to be downloaded from drupal.org, so it should be edited manually to contain only the following lines:

name = Views Table Group
description = Views style plugin to display Views results as cells in a table, grouping by row and column.
package = Views
core = 7.x

files[] = tablegroup.views.inc
files[] = tablegroup_plugin_style_tablegroup.inc
yannickoo’s picture

...or you clone the git repo then you have no errors. You always should use git apply instead of patch < [patch]. I missed the part with the $items instead of $variables['items'], sorry. Thank you!

yannickoo’s picture

Feels like patch battle, you have a whitespace so I updated the patch, sorry.

yannickoo’s picture

Status: Needs review » Reviewed & tested by the community

I tested this and it works fine so I set the status to RTBC. I message becw, the maintainer now for a Drupal 7 version.

antiorario’s picture

You're right about the patch and using git. It's just that not everyone might be using git, so I was going for something that would help those who don't.

Patch battle is good, it keeps things going.

yannickoo’s picture

So here is quick introduction how to apply the patch. RTFM guys ;)

git clone --recursive --branch 6.x-1.x http://git.drupal.org/project/tablegroup.git  
cd tablegroup
wget http://drupal.org/files/tablegroup-1135500-14.patch  
git apply tablegroup-1135500-14.patch

And when you are a windows user you have to download the patch patch and put it manually into the tablegroup directory.

I sent a message to becw, I hope he'll answer fast.

antiorario’s picture

Any news?

tchurch’s picture

I've used the instructions laid out in #17 and the Drupal 7 works great but I have a problem.
As there isn't yet a Version 7.x to report it on, I thought I'd mention it here.

I have a view using Taxonomy terms for the column and row (both attached to the node).
I want the order of the rows and columns to be by their weights but I can't get it to work for both.

If I use the Row and Column sorts, it's not in the correct order.
If I add sort criteria for one or both columns, only one of them is correct.

Can someone check this? Is it something that can easily be fixed?
I never tried the 6.x version as my site is 7.x anyway.

Thanks.

antiorario’s picture

I had a similar problem to yours, and I solved it with a template function overriding template_preprocess_tablegroup_view_tablegroup(), in which I've forced the sorting of the table according to my own criteria, and regenerated the table itself. It's messy, and probably adds some overhead, but it's the only solution that didn't involve changing the module.

tchurch’s picture

I'm not that familiar with this module to be able to write a function. Can you offer any help? An example function maybe? Otherwise I'll wait for someone to finish updating the v7 module.

Also, once the maintainer(s) of the module have created a v7 branch, then we can start opening proper issues for it.

yannickoo’s picture

I asked to maintain this module so we can bring this module forward.

yannickoo’s picture

Status: Reviewed & tested by the community » Fixed

Say hello to Views Table Group 7.x so that we can finally close this issue. Feel free to report new issues for the 7.x version.

Status: Fixed » Closed (fixed)

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