Display venue table body only when content exists

This commit is contained in:
Brian Miyaji
2014-03-29 18:07:52 +11:00
parent 8488cf56bc
commit 62094357c6

View File

@@ -29,16 +29,18 @@ foreach( $venues as $venue ):
<th><?php echo $name; ?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $address; ?></td>
</tr>
<?php if ( $show_maps && $latitude != null && $longitude != null ): ?>
<?php if ( $address != null || ( $show_maps && $latitude != null && $longitude != null ) ): ?>
<tbody>
<tr>
<td><div class="sp-google-map" data-address="<?php echo $address; ?>" data-latitude="<?php echo $latitude; ?>" data-longitude="<?php echo $longitude; ?>"></div></td>
<td><?php echo $address; ?></td>
</tr>
<?php endif; ?>
</tbody>
<?php if ( $show_maps && $latitude != null && $longitude != null ): ?>
<tr>
<td><div class="sp-google-map" data-address="<?php echo $address; ?>" data-latitude="<?php echo $latitude; ?>" data-longitude="<?php echo $longitude; ?>"></div></td>
</tr>
<?php endif; ?>
</tbody>
<?php endif; ?>
</table>
<?php
endforeach;