X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fincludes%2Fplc_tables.php;h=6fc1835578fcf4419a6413de0d14875b62e2b441;hb=50c52e39521aa6ac664e542848057822fed4d395;hp=d079c93da6d19e1a08cb5e62ab3fc03b7a6e1ec8;hpb=c0aa374fdfee009b36dd0cf00fc3e1f5c28061c6;p=plewww.git diff --git a/planetlab/includes/plc_tables.php b/planetlab/includes/plc_tables.php index d079c93..6fc1835 100644 --- a/planetlab/includes/plc_tables.php +++ b/planetlab/includes/plc_tables.php @@ -18,26 +18,28 @@ function plc_table_cell($cell) { // table_id: 's id tag // headers: an associative array "label"=>"type" // column_sort: the column to sort on at load-time -// options : an associative array to override options: -// - search_area : boolean +// options : an associative array to override options (should be passed to both _stsart and _end) +// - search_area : boolean (default true) +// - notes_area : boolean (default true) // - pagesize: the initial pagination size // - pagesize_def: the page size when one clicks the pagesize reset button // - max_pages: the max number of pages to display in the paginator -function plc_table_start ($table_id, $headers, $column_sort, - $options=array()) { - $search_area= array_key_exists('search_area',$options) ? $options['search_area'] : true; - $max_pages= array_key_exists('max_pages',$options) ? $options['max_pages'] : 10; - $pagesize= array_key_exists('pagesize',$options) ? $options['pagesize'] : 25; - $pagesize_def= array_key_exists('pagesize_def',$options) ? $options['pagesize_def'] : 999; - - if ($search_area) { +function plc_table_start ($table_id, $headers, $column_sort, $options) { + $search_area = array_key_exists('search_area',$options) ? $options['search_area'] : true; + $max_pages = array_key_exists('max_pages',$options) ? $options['max_pages'] : 10; + $pagesize = array_key_exists('pagesize',$options) ? $options['pagesize'] : 25; + $pagesize_def = array_key_exists('pagesize_def',$options) ? $options['pagesize_def'] : 999; + + if ($search_area) plc_table_search_area($table_id,$pagesize,$pagesize_def); - } plc_table_head($table_id,$headers,$column_sort,$max_pages,$pagesize); } -function plc_table_end () { +function plc_table_end ($options) { plc_table_foot(); + $notes_area = array_key_exists('notes_area',$options) ? $options['notes_area'] : true; + if ($notes_area) + plc_table_notes(); } ////////////////////