Allow event performance tables to be split by position

This commit is contained in:
Brian Miyaji
2015-03-03 17:20:44 +11:00
parent 91171b9b95
commit 7cf5946880
12 changed files with 638 additions and 245 deletions

View File

@@ -40,7 +40,7 @@ class SP_Settings_Events extends SP_Settings_Page {
$settings = array_merge(
array(
array( 'title' => __( 'Event Options', 'sportspress' ), 'type' => 'title','desc' => '', 'id' => 'event_options' ),
array( 'title' => __( 'Event Options', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'event_options' ),
),
apply_filters( 'sportspress_event_options', array(
@@ -86,24 +86,8 @@ class SP_Settings_Events extends SP_Settings_Page {
),
array(
'desc' => __( 'Players', 'sportspress' ),
'id' => 'sportspress_event_show_players',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => '',
),
array(
'desc' => __( 'Staff', 'sportspress' ),
'id' => 'sportspress_event_show_staff',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => '',
),
array(
'desc' => __( 'Total', 'sportspress' ),
'id' => 'sportspress_event_show_total',
'desc' => __( 'Player Performance', 'sportspress' ),
'id' => 'sportspress_event_show_performance',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'end',
@@ -124,17 +108,6 @@ class SP_Settings_Events extends SP_Settings_Page {
array( 'type' => 'delimiter' ),
array(
'title' => __( 'Player Performance', 'sportspress' ),
'id' => 'sportspress_event_performance_mode',
'default' => 'values',
'type' => 'radio',
'options' => array(
'values' => __( 'Values', 'sportspress' ),
'icons' => __( 'Icons', 'sportspress' ),
),
),
array(
'title' => __( 'Venues', 'sportspress' ),
'desc' => __( 'Display maps', 'sportspress' ),
@@ -185,10 +158,103 @@ class SP_Settings_Events extends SP_Settings_Page {
'default' => 'no',
'type' => 'checkbox',
),
)),
) ),
array(
array( 'type' => 'sectionend', 'id' => 'event_options' ),
),
array(
array( 'title' => __( 'Player Performance', 'sportspress' ), 'type' => 'title', 'desc' => '', 'id' => 'performance_options' ),
),
apply_filters( 'sportspress_performance_options', array(
array(
'title' => __( 'Rows', 'sportspress' ),
'desc' => __( 'Staff', 'sportspress' ),
'id' => 'sportspress_event_show_staff',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
),
array(
'desc' => __( 'Players', 'sportspress' ),
'id' => 'sportspress_event_show_players',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => '',
),
array(
'desc' => __( 'Extras', 'sportspress' ),
'id' => 'sportspress_event_show_extras',
'default' => 'no',
'type' => 'checkbox',
'checkboxgroup' => '',
),
array(
'desc' => __( 'Total', 'sportspress' ),
'id' => 'sportspress_event_show_total',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'end',
),
array(
'title' => __( 'Columns', 'sportspress' ),
'id' => 'sportspress_event_performance_columns',
'default' => 'auto',
'type' => 'radio',
'options' => array(
'auto' => __( 'Auto', 'sportspress' ),
'manual' => __( 'Manual', 'sportspress' ),
),
),
array(
'title' => __( 'Mode', 'sportspress' ),
'id' => 'sportspress_event_performance_mode',
'default' => 'values',
'type' => 'radio',
'options' => array(
'values' => __( 'Values', 'sportspress' ),
'icons' => __( 'Icons', 'sportspress' ),
),
),
array(
'title' => __( 'Players', 'sportspress' ),
'desc' => __( 'Display squad numbers', 'sportspress' ),
'id' => 'sportspress_event_show_player_numbers',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
),
array(
'desc' => __( 'Split players by position', 'sportspress' ),
'id' => 'sportspress_event_split_players_by_position',
'default' => 'false',
'type' => 'checkbox',
'checkboxgroup' => 'end',
),
array(
'title' => __( 'Total', 'sportspress' ),
'id' => 'sportspress_event_total_performance',
'default' => 'all',
'type' => 'radio',
'options' => array(
'all' => __( 'All', 'sportspress' ),
'primary' => __( 'Primary', 'sportspress' ),
),
),
) ),
array(
array( 'type' => 'sectionend', 'id' => 'performance_options' ),
)
);