Hello,

I noticed user generated Views tables do not have the .table class added required by Bootstrap.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

valkum’s picture

Here is a patch for that.
Works for me.

valkum’s picture

Status: Active » Needs review
shelane’s picture

Is that in the views_bootstrap module? I use the module for adding carousels, but haven't tried it to see if it adds this class in the table output.

markhalliwell’s picture

Status: Needs review » Fixed

No, this is just for a standard Views table style.

Thanks @valkum!

Committed de74cfe to 7.x-3.x.

jeremymcminn’s picture

I'm not sure what I'm doing, but this does not add a table class to my views automatically? Ideas? I have the latest dev release installed.

markhalliwell’s picture

Status: Fixed » Needs work

Hmm, try renaming the file to views-view-table.vars.php. I can't believe I didn't catch this.

jeremymcminn’s picture

Yep that did the trick. Thanks Mark.

markhalliwell’s picture

Status: Needs work » Fixed
valkum’s picture

Version: 7.x-3.x-dev » 7.x-3.0-rc2

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

oijiojiojioj

markobahor’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs work

This doesn't work if you use views_aggregator tables. The ".table" class is still missing then.

markhalliwell’s picture

Status: Needs work » Closed (fixed)
Related issues: +#2231215: Provide setting to change default table styles

That is because it is an entirely separate module/views plugin/theme hook.

Please try the latest 7.x-3.1-beta2 or dev version.
That module appears to use theme('table', ...) which means that the latest code should add this class in automatically now. See the related issues, specifically: http://cgit.drupalcode.org/bootstrap/tree/theme/system/table.vars.php?id...

markobahor’s picture

Version: 7.x-3.0-rc2 » 7.x-3.1-beta2
Component: User interface » Templates
Category: Feature request » Bug report
Status: Closed (fixed) » Needs work

I am using the latest dev version 7.x-3.1-beta2+16-dev. The problem is still there with views_aggregator tables.
Sorry about the lack of info.

markhalliwell’s picture

Version: 7.x-3.1-beta2 » 7.x-3.0-rc2
Component: Templates » User interface
Category: Bug report » Feature request
Status: Needs work » Closed (fixed)

Please do not open old issues.

https://www.drupal.org/node/add/project-issue/bootstrap#creating_new_issues

What you are requesting is to support an entirely separate [low install] module. This is a feature request, not a bug. It has nothing to do with this issue (which is about supporting core's theme_table). I would recommend looking at existing implementation and duplicate the functionality for their specific template/theme hook in your sub-theme. I do not see this being widely supported by this project (at the moment).