Using views grid table system with bootstrap seemed to create an issue for some projects. I updated views.inc and added views-view-grid.tpl.php to my template to create a more consistent use of grid items.

Currently the patch only works for horizontal setup of views. I plan on adding the vertical version, however before I do I want to make sure this would be a good commit to this project.

By adding this theme, it would eliminate the need to use the http://drupal.org/project/views_responsive_grid module for bootstrap projects.

Files: 
CommentFileSizeAuthor
#2 bootstrap-convert-views-grid-1931466-1.patch2.81 KBjorge.aguero
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Comments

Status:Fixed» Needs review

StatusFileSize
new2.81 KB
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Assigned:jorge.aguero» Unassigned

Status:Needs review» Needs work

I think you have made an error, as the function names are changing (maybe you had a temp theme you hacked up?) Example;

-function bootstrap_preprocess_views_view_grid(&$vars) {
+function fpbase_preprocess_views_view_grid(&$vars) {

Category:task» feature

I'm sorry, but this "feature" isn't as practical as it may seem. I applaud your forward thinking though. There are two distinct differences between what the default views grid is for and what http://dgo.to/views_responsive_grid is for.

I agree that a responsive grid should be used whenever possible, yes, however imposing it as the default in a [edit]theme base theme? No. I have indeed encountered the need for both types of grids. I know the default grid isn't responsive and given the responsive movement, it seems like this would be great idea.

However, you must also think about the impact it will have when dealing with large quantities of actual data. Many times there might be a huge list (complete with headers and columns) of generated data which is useful as a table (especially for copying and pasting purposes).

This should not be included in the Bootstrap base theme. I would mark this as "won't fix", but I don't want to come across as an a$$.

Despite my realization in #1903746: Replace the views grid table template with one using divs. I'd still like to get some feed back from others though if this is an acceptable solution or if we should just leave this functionality to http://dgo.to/views_responsive_grid. You have more configuration options, per view, in the module. I, for one, don't want to have to replicate that for this base theme. Nor the support and documentation it would require to maintain it.

Title:Converting views grid table to bootstrap div grid[needs wundo's feedback] Converting views grid table to bootstrap div grid
Status:Needs work» Fixed

After giving this some serious thought and discussed it in depth with co-workers here's what I've concluded from that conversation:

For 7.x we should really just use http://dgo.to/views_responsive_grid. It would be too much to maintain duplicate functionality of an existing module inside this project. Plus you won't have the same [ease of] configuration (edit: for things like row and column classes per view) like you do with the module and would be pretty limited (will have to be hard coded in the sub-theme) in what you can do with the grid.

For 8.x, #1903746: Replace the views grid table template with one using divs will eliminate this issue entirely.

-1

Renaming title and status to grab wundo's attention to provide feedback.

Title:[needs wundo's feedback] Converting views grid table to bootstrap div gridConverting views grid table to bootstrap div grid
Status:Fixed» Closed (works as designed)

Hi Mark,
Thanks for the heads up, indeed, IMO views_responsive_grid is the way to go for Drupal 7.

But I think the right status for this would be work as designed. ;)

Right, just marked it as "fixed" so it turned green to get your attention.

Edit: since I can't assign it to you directly because I'm not yet officially part of the project ;)