Refine event performance interface
This commit is contained in:
@@ -188,6 +188,16 @@ table.widefat.sp-data-table td:first-child {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table.widefat.sp-data-table th.icon,
|
||||||
|
table.widefat.sp-data-table td.icon {
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.widefat.sp-data-table th.icon span,
|
||||||
|
table.widefat.sp-data-table td.icon span {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
table.widefat.sp-data-table input[type="text"],
|
table.widefat.sp-data-table input[type="text"],
|
||||||
table.widefat.sp-data-table input[type="number"] {
|
table.widefat.sp-data-table input[type="number"] {
|
||||||
min-width: 1.25em;
|
min-width: 1.25em;
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ class SP_Meta_Box_Event_Performance {
|
|||||||
<table class="widefat sp-data-table sp-performance-table sp-sortable-table">
|
<table class="widefat sp-data-table sp-performance-table sp-sortable-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th class="icon"> </th>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
<th><?php _e( 'Player', 'sportspress' ); ?></th>
|
||||||
<th>
|
<th>
|
||||||
@@ -93,6 +94,7 @@ class SP_Meta_Box_Event_Performance {
|
|||||||
$value = sp_array_value( $player_performance, 'number', '' );
|
$value = sp_array_value( $player_performance, 'number', '' );
|
||||||
?>
|
?>
|
||||||
<tr class="sp-row sp-post" data-player="<?php echo $player_id; ?>">
|
<tr class="sp-row sp-post" data-player="<?php echo $player_id; ?>">
|
||||||
|
<td class="icon"><span class="dashicons dashicons-menu post-state-format"></span></td>
|
||||||
<td>
|
<td>
|
||||||
<input class="small-text sp-player-number-input" type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][number]" value="<?php echo $value; ?>" />
|
<input class="small-text sp-player-number-input" type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][number]" value="<?php echo $value; ?>" />
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class SP_Meta_Box_Table_Data {
|
|||||||
public static function table( $columns = array(), $usecolumns = null, $data = array(), $placeholders = array(), $adjustments = array() ) {
|
public static function table( $columns = array(), $usecolumns = null, $data = array(), $placeholders = array(), $adjustments = array() ) {
|
||||||
if ( is_array( $usecolumns ) )
|
if ( is_array( $usecolumns ) )
|
||||||
$usecolumns = array_filter( $usecolumns );
|
$usecolumns = array_filter( $usecolumns );
|
||||||
$show_team_logo = get_option( 'sportspress_table_show_logos', false );
|
$show_team_logo = get_option( 'sportspress_table_show_logos', 'no' ) == 'yes' ? true : false;
|
||||||
?>
|
?>
|
||||||
<ul class="subsubsub sp-table-bar">
|
<ul class="subsubsub sp-table-bar">
|
||||||
<li><a href="#sp-table-values" class="current"><?php _e( 'Values', 'sportspress' ); ?></a></li> |
|
<li><a href="#sp-table-values" class="current"><?php _e( 'Values', 'sportspress' ); ?></a></li> |
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class SP_Settings_Teams extends SP_Settings_Page {
|
|||||||
array( 'type' => 'sectionend', 'id' => 'team_options' ),
|
array( 'type' => 'sectionend', 'id' => 'team_options' ),
|
||||||
|
|
||||||
array( 'title' => __( 'League Tables', 'sportspress' ), 'type' => 'title', 'id' => 'table_options' ),
|
array( 'title' => __( 'League Tables', 'sportspress' ), 'type' => 'title', 'id' => 'table_options' ),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'title' => __( 'Teams', 'sportspress' ),
|
'title' => __( 'Teams', 'sportspress' ),
|
||||||
'desc' => __( 'Display logos', 'sportspress' ),
|
'desc' => __( 'Display logos', 'sportspress' ),
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ $status = $event->status();
|
|||||||
|
|
||||||
$show_players = get_option( 'sportspress_event_show_players', 'yes' ) == 'yes' ? true : false;
|
$show_players = get_option( 'sportspress_event_show_players', 'yes' ) == 'yes' ? true : false;
|
||||||
$link_posts = get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false;
|
$link_posts = get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false;
|
||||||
$sortable = get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false;
|
|
||||||
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
|
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
|
||||||
$responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false;
|
$responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false;
|
||||||
$mode = get_option( 'sportspress_event_performance_mode', 'values' );
|
$mode = get_option( 'sportspress_event_performance_mode', 'values' );
|
||||||
@@ -67,7 +66,7 @@ if ( is_array( $teams ) ):
|
|||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
|
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
|
||||||
<table class="sp-event-performance sp-data-table <?php if ( $responsive ) { ?> sp-responsive-table<?php } if ( $has_players && $sortable ) { ?> sp-sortable-table<?php } ?>">
|
<table class="sp-event-performance sp-data-table <?php if ( $responsive ) { ?> sp-responsive-table<?php } ?>">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<?php if ( $has_players ): ?>
|
<?php if ( $has_players ): ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user