Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2012 at 14:01 UTC
Updated:
24 May 2019 at 16:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mustanggb commentedComment #2
danwonac commentedI had the same issue and followed the same basic premise. To only do this when 'fill single line' is checked, I instead added a new loop (no need for handling $rows[1+] since it only occurs when there is only one row). this is at approximately row 737 of theme.inc for version 7.x-3.6. I too have yet to figure out patches:
Comment #3
danwonac commentedAttempt at a patch...
Comment #4
imclean commentedThanks danwonac. This replaces tabs with 2 spaces.
Comment #5
kari.nies commentedThe above patch did not work for me.
The problem appears to be this line:
if (!empty($handler->options['fill_single_line']) && count($rows)) {
It should read.
if (!empty($handler->options['fill_single_line']) && $row_count==count($rows))
I've attached a new patch.
Comment #7
NaX commentedThe last patch worked for me. Heres a re-rolled patch.
Comment #8
gianfrasoft commented#7 seems to be perfect.
Why don't you put in the next views version?
Comment #9
DaPooch commented#7 almost got me where I need to be but it doesn't appear to apply the row class to the rows it adds which I need for styling purposes. Any ideas? In looking through the code it appears that the row/column classes don't get applied till further down in the function and that they require a row_index to be set, just need to figure out if its possible to add these indexes to the filler rows that the patch in #7 generates.
Comment #10
DaPooch commentedGot it. Slight mod to #7 to allow column classes to be applied to the fill columns as well:
Sadly I'm not sure how to create a patch so if anyone wants to review and roll a patch I'm sure it would be appreciated.
Comment #11
clfer commentedHi
I needed this patch so here is my attempt taking into account last comment about column classes.
It add the same class as it normally would if there was content plus a new one ".col-fill"
New patch attached
Comment #12
mustanggb commentedkari.nies, NaX, gianfrasoft, alanpuccinelli, clfer: This issue is only concerned with the functionality when using vertical alignment, the code you are touching is when horizontal alignment is used, for this see the other thread mentioned #1744478: Grid format disregards "number of columns" option for a single line of results.
Here is an update that addresses danwonac's concern of only being applied when the box is ticked:
Comment #13
mustanggb commentedComment #14
mustanggb commentedAnd a patch.
Comment #15
damienmckennaBumping to the next release.
Comment #16
damienmckennaTaking this off the plan for the next release, will consider it later.
Comment #17
chris matthews commentedThe 2 year old patch in #14 to theme.inc applied cleanly to the latest views 7.x-3.x-dev
Comment #18
mustanggb commentedNot sure why this was dropped from consideration previously, so retrying.
Obviously I can't really mark as RTBC, so if there is another reason please let me know.
Comment #19
damienmckennaI think it was because of the lack of reviews.
Could someone please add a comment to the for() loop explaining the logic? Thanks.
Comment #20
damienmckennaComment #21
damienmckennaComment #22
damienmckennaSimplified the code a little.
Comment #24
damienmckennaCommitted. Thanks all.