Use primary performance in totals row when teams combined

This commit is contained in:
Brian Miyaji
2015-03-15 15:48:08 +11:00
parent 449495e6f4
commit dde9ce66c8

View File

@@ -112,6 +112,7 @@ $totals = array();
?> ?>
</tbody> </tbody>
<?php if ( $show_total ): ?> <?php if ( $show_total ): ?>
<?php if ( ! $primary || sizeof( array_intersect_key( $totals, array_flip( (array) $primary ) ) ) ): ?>
<tfoot> <tfoot>
<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '"> <tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '">
<?php <?php
@@ -129,6 +130,8 @@ $totals = array();
continue; continue;
if ( $key == 'position' ): if ( $key == 'position' ):
$value = '&mdash;'; $value = '&mdash;';
elseif ( $primary && $key !== $primary ):
$value = '&nbsp;';
elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ): elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
$value = $row[ $key ]; $value = $row[ $key ];
else: else:
@@ -150,6 +153,7 @@ $totals = array();
</tr> </tr>
</tfoot> </tfoot>
<?php endif; ?> <?php endif; ?>
<?php endif; ?>
</table> </table>
</div> </div>
</div> </div>