This page is a sample of page using tables. It is designed to make test with
- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
- jmobile (add parameter ">dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)
- no javascript / usage for bind people (add parameter ">nojs=1 to force disable javascript)
- dataTables
- tablednd
Example 0a : Table with div+div+div containg a select that should be overflowed and truncated => Use this to align text or form
Example 0b: Table with div+form+div containg a select that should be overflowed and truncated => Use this to align text or form
Example 0c: Table with table+tr+td containg a select that should be overflowed and truncated => Use this to align text or form
Example 1 : Standard table/thead/tbody/tr/th-td (no class pair/impair on td) => Use this if you need the drag and drop for lines or for long result tables
initAsSpecimen();
$sortfield='aaa';
$sortorder='ASC';
$tasksarray=array(1,2,3); // To force having several lines
$tagidfortablednd='tablelines3';
if (! empty($conf->use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
$nav='';
$nav.='';
print_barre_liste('Title of my list', 3, $_SERVER["PHP_SELF"], '', '', '', 'Text in middle', 20, 5000, '', 0, $nav);
?>
';
$moreforfilter.=$langs->trans('This is a select list for a filter A'). ': ';
$cate_arbo = array('field1'=>'value1a into the select list A','field2'=>'value2a');
$moreforfilter.=$form->selectarray('search_aaa', $cate_arbo, '', 1); // List without js combo
$moreforfilter.='';
$moreforfilter.='
';
$moreforfilter.=$langs->trans('This is a select list for a filter B'). ': ';
$cate_arbo = array('field1'=>'value1b into the select list B','field2'=>'value2b');
$moreforfilter.=$form->selectarray('search_bbb', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo
$moreforfilter.='
';
$moreforfilter.='
';
$moreforfilter.=$langs->trans('This is a select list for a filter C'). ': ';
$cate_arbo = array('field1'=>'value1c into the select list C','field2'=>'value2c');
$moreforfilter.=$form->selectarray('search_ccc', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo
$moreforfilter.='
';
$moreforfilter.='
';
$moreforfilter.=$langs->trans('This is a select list for a filter D'). ': ';
$cate_arbo = array('field1'=>'value1d into the select list D','field2'=>'value2d');
$moreforfilter.=$form->selectarray('search_ddd', $cate_arbo, '', 1, 0, 0, '', 0, 0, 0, 0, '', 1); // List with js combo
$moreforfilter.='
Example 3 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd => Use this for tables that need to have a different form for each line, but AVOID IT if possible (drag and drop of lines does not work for this case, also height of title can't be forced to a minimum)
use_javascript_ajax)) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
?>