From 86bb9e6f03bd21df95961b588aba0711ab8f3c6c Mon Sep 17 00:00:00 2001 From: Takumi Date: Mon, 29 Jul 2013 18:15:14 +1000 Subject: [PATCH] Handle default tables and auto checkbox --- helpers.php | 40 +++++++++++++++++++++++++--------------- table.php | 3 +-- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/helpers.php b/helpers.php index c6f07ce0..10ce9f64 100644 --- a/helpers.php +++ b/helpers.php @@ -177,7 +177,7 @@ if ( ! function_exists( 'sp_post_checklist' ) ) { } if ( ! function_exists( 'sp_data_table' ) ) { - function sp_data_table( $data = array(), $index = 0, $columns = array( 'Name' ) ) { + function sp_data_table( $data = array(), $index = 0, $columns = array( 'Name' ), $total = true ) { if ( !is_array( $data ) ) $data = array(); ?> @@ -187,6 +187,7 @@ if ( ! function_exists( 'sp_data_table' ) ) { + @@ -194,6 +195,10 @@ if ( ! function_exists( 'sp_data_table' ) ) { $i = 0; foreach ( $data as $key => $values ): if ( !$key ) continue; + if ( array_key_exists( 'auto', $values ) ) + $auto = (int)$values[ 'auto' ]; + else + $auto = 0; ?> + /> + /> - + > - - - - - + + + /> + + /> + + \ No newline at end of file