Enable selecting column groups in player lists

This commit is contained in:
Brian Miyaji
2014-04-29 19:43:19 +10:00
parent 833fb2ada5
commit ae1c4be799
4 changed files with 54 additions and 50 deletions

View File

@@ -23,15 +23,15 @@ class SP_Meta_Box_List_Columns {
?>
<div id="sp-column-group-select">
<label class="selectit">
<input type="checkbox" name="sp_column_group[]" value="sp_performance" <?php checked( true, ( empty( $column_groups ) || in_array( 'sp_performance', $column_groups ) ) ); ?>>
<input type="checkbox" name="sp_column_group[]" value="sp_performance" <?php checked( true, in_array( 'sp_performance', $column_groups ) ); ?>>
<?php _e( 'Performance', 'sportspress' ); ?>
</label><br>
<label class="selectit">
<input type="checkbox" name="sp_column_group[]" value="sp_metric" <?php checked( true, ( empty( $column_groups ) || in_array( 'sp_metric', $column_groups ) ) ); ?>>
<input type="checkbox" name="sp_column_group[]" value="sp_metric" <?php checked( true, in_array( 'sp_metric', $column_groups ) ); ?>>
<?php _e( 'Metrics', 'sportspress' ); ?>
</label><br>
<label class="selectit">
<input type="checkbox" name="sp_column_group[]" value="sp_statistic" <?php checked( true, ( empty( $column_groups ) || in_array( 'sp_statistic', $column_groups ) ) ); ?>>
<input type="checkbox" name="sp_column_group[]" value="sp_statistic" <?php checked( true, in_array( 'sp_statistic', $column_groups ) ); ?>>
<?php _e( 'Statistics', 'sportspress' ); ?>
</label><br>
</div>

View File

@@ -98,7 +98,7 @@ class SP_Meta_Box_List_Data {
else:
?>
<tr class="sp-row alternate">
<td colspan="<?php $colspan = sizeof( $columns ) + 1; echo $colspan; ?>">
<td colspan="<?php $colspan = sizeof( $columns ) + 2; echo $colspan; ?>">
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Players', 'sportspress' ) ); ?>
</td>
</tr>
@@ -145,7 +145,7 @@ class SP_Meta_Box_List_Data {
else:
?>
<tr class="sp-row alternate">
<td colspan="<?php $colspan = sizeof( $columns ) + 1; echo $colspan; ?>">
<td colspan="<?php $colspan = sizeof( $columns ) + 2; echo $colspan; ?>">
<?php printf( __( 'Select %s', 'sportspress' ), __( 'Players', 'sportspress' ) ); ?>
</td>
</tr>

View File

@@ -85,7 +85,7 @@ class SP_Meta_Box_List_Details {
'number' => __( 'Number', 'sportspress' ),
'name' => __( 'Name', 'sportspress' ),
),
'post_type' => array( 'sp_metric', 'sp_statistic' ),
'post_type' => array( 'sp_performance', 'sp_metric', 'sp_statistic' ),
'name' => 'sp_orderby',
'selected' => $orderby,
'values' => 'slug',