Display same position for teams tied in table

This commit is contained in:
Brian Miyaji
2014-10-19 16:46:43 +11:00
parent 7af1c9a635
commit 0811dabd28
2 changed files with 50 additions and 3 deletions

View File

@@ -113,7 +113,7 @@ foreach ( $data as $team_id => $row ):
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . $class . '">';
// Rank
$output .= '<td class="data-rank">' . $before . ( $start + 1 ) . $after . '</td>';
$output .= '<td class="data-rank">' . $before . sp_array_value( $row, 'pos' ) . $after . '</td>';
$name_class = '';
@@ -135,7 +135,7 @@ foreach ( $data as $team_id => $row ):
$output .= '<td class="data-name' . $name_class . '">' . $name . '</td>';
foreach( $labels as $key => $value ):
if ( $key == 'name' )
if ( in_array( $key, array( 'pos', 'name' ) ) )
continue;
if ( ! is_array( $columns ) || in_array( $key, $columns ) )
$output .= '<td class="data-' . $key . '">' . $before . sp_array_value( $row, $key, '&mdash;' ) . $after . '</td>';