Insert group name anchors to player list

This commit is contained in:
Brian Miyaji
2014-05-09 23:00:07 +10:00
parent f79cdc5a47
commit 7868ede19b
2 changed files with 8 additions and 4 deletions

View File

@@ -108,8 +108,10 @@ endif;
foreach ( $groups as $group ):
$i = 0;
if ( ! empty( $group->name ) )
echo '<h3 class="sp-list-group-name">' . $group->name . '</h3>';
if ( ! empty( $group->name ) ):
$output .= '<a name="group-' . $group->slug . '" id="group-' . $group->slug . '"></a>';
$output .= '<h3 class="player-group-name">' . $group->name . '</h3>';
endif;
foreach( $data as $player_id => $performance ): if ( empty( $group->term_id ) || has_term( $group->term_id, 'sp_position', $player_id ) ):

View File

@@ -65,8 +65,10 @@ endif;
$output = '';
foreach ( $groups as $group ):
if ( ! empty( $group->name ) )
$output .= '<h3 class="sp-list-group-name">' . $group->name . '</h3>';
if ( ! empty( $group->name ) ):
$output .= '<a name="group-' . $group->slug . '" id="group-' . $group->slug . '"></a>';
$output .= '<h3 class="player-group-name">' . $group->name . '</h3>';
endif;
$output .= '<div class="sp-table-wrapper sp-scrollable-table-wrapper">' .
'<table class="sp-player-list sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . ( $sortable ? ' sp-sortable-table' : '' ) . ( $paginated ? ' sp-paginated-table' : '' ) . '" data-sp-rows="' . $rows . '">' . '<thead>' . '<tr>';