hello,
enabling the display to flipped table, the views option hiding empty columns (which now are actually rows since the flipping happens) doesn't work any more. Of course if it's a normal table display, it works as it should. Is there a solution for this problem?
Thank you in advance for any help.

CommentFileSizeAuthor
#7 empty-rows-not-hidden.jpg23.37 KBasb

Comments

antoniotorres’s picture

I came up with a quick fix for this, it doesn't play nice with the hiding options in views but I don't particularly care for that in my case, I don't ever want it to show empty flipped rows.

it's in views-flipped-table.tpl.php

<?php foreach ($rows_flipped as $field_name => $row) : ?>
    	<?php if(!empty($row[0])): ?>
      <tr class="<?php print $row_classes_flipped[$field_name]; ?>">
        <th>
          <?php echo $header[$field_name]; ?>
        </th>
        <?php foreach ($row as $index => $item): ?>
          <td>
            <?php echo $item; ?>
          </td>
        <?php endforeach; ?>
      </tr>
      <?php endif; ?>
    <?php endforeach; ?>

I added the if(!empty($row[0])): and the endif; works just fine. hides all empty rows.

justin.koh’s picture

Thanks, #1 does not respect the hiding options in Views UI as stated but works well for me.

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

This is working for me: I have a view with one column that has no data. As a normal table, I can have it hidden. As a flipped table, I get no row for that data field.

Can you give more detail about what you're doing and what you expect and what's going wrong?

Can you try with the latest release too please?

naught101’s picture

Project: Views Hacks » Views Flipped Table
Component: Views Flipped Table » Code
naught101’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Definitely works for me, as long as the "hide empty column" field is checked in the view style settings. (We should change those "columns" to rows though).

youlikeit’s picture

Issue summary: View changes

My solution is add a filter with the field which is depentent (in my case it was body) for your view and set the filter to hide if empty

asb’s picture

Status: Closed (cannot reproduce) » Active
StatusFileSize
new23.37 KB

Hiding empty rows never worked with 'views_flipped_table' from 'views_hacks', but there was an excellent patch that fixed the issue. However, I can not find the issue anymore, but I'm running patched 'views_flipped_table' on a dozend D6 sites for years. And I'm keeping the working code in a safe since the patch never made it into the dev release.

With D7 and the stand-alone 'views_flipped_table' module, the issue comes up again. The "hide empty column" has absolutely no effect in this matter, see attached screenshot. Please fix this annoying issue!

asb’s picture

Status: Active » Closed (duplicate)

Found it, the issue was moved away from 'views_hacks'.

This is a duplicate of the long-standing issue #1002672: Make "Hide if empty" fully collapsible.