Exemplo n.º 1
0
// adding custom fields:
require_once 'modules/DynamicFields/templates/Files/DetailView.php';
if (SugarACL::checkAccess('DataSets', 'edit')) {
    $xtpl->parse('edit_button');
    $xtpl->assign('EDIT_BUTTON', $xtpl->text('edit_button'));
}
if (SugarACL::checkAccess('DataSets', 'delete')) {
    $xtpl->parse('delete_button');
    $xtpl->assign('DELETE_BUTTON', $xtpl->text('delete_button'));
}
$xtpl->parse("main");
$xtpl->out("main");
//Show the datasets
$old_contents = ob_get_contents();
ob_end_clean();
if ($sub_xtpl->var_exists('subpanel', 'SUBDATASETS')) {
    ob_start();
    global $focus_list;
    $focus_list = $focus->get_data_sets("ORDER BY list_order_y ASC");
    include 'modules/DataSets/SubPanelView.php';
    echo "<BR>\n";
    $subdatasets = ob_get_contents();
    ob_end_clean();
}
ob_start();
echo $old_contents;
if (!empty($subdatasets)) {
    $sub_xtpl->assign('SUBDATASETS', $subdatasets);
}
$sub_xtpl->parse("subpanel");
$sub_xtpl->out("subpanel");