$dashboardId, 'refr' => $refr, 'pure' => 1, ]; $urlFull = $url.'&'.http_build_query($queryFull); $fullscreen['text'] = ''; $fullscreen['text'] .= html_print_image( 'images/full_screen.png', true, [ 'title' => __('Full screen mode'), 'class' => 'invert_filter', ] ); $fullscreen['text'] .= ''; // Button for display normal screen mode. $queryNormal = ['dashboardId' => $dashboardId]; $urlNormal = $url.'&'.http_build_query($queryNormal); $normalscreen['text'] = ''; $normalscreen['text'] .= html_print_image( 'images/normal_screen.png', true, [ 'title' => __('Back to normal mode'), 'class' => 'invert_filter', ] ); $normalscreen['text'] .= ''; // Button for display modal options dashboard. $options['text'] = ' __('Update Dashboard'), 'btn_text' => __('Ok'), 'btn_cancel' => __('Cancel'), 'url' => $ajaxController, 'url_ajax' => ui_get_full_url('ajax.php'), 'dashboardId' => $dashboardId, ] ); $options['text'] .= ')\'>'; $options['text'] .= html_print_image( 'images/setup.png', true, [ 'title' => __('Options'), 'class' => 'invert_filter', ] ); $options['text'] .= ''; // Button for back to list dashboards. $back_to_dashboard_list['text'] = ''; $back_to_dashboard_list['text'] .= html_print_image( 'images/list.png', true, [ 'title' => __('Back to dashboards list'), 'class' => 'invert_filter', ] ); $back_to_dashboard_list['text'] .= ''; $slides['text'] = ' __('Slides'), 'btn_text' => __('Ok'), 'btn_cancel' => __('Cancel'), 'url' => $ajaxController, 'url_ajax' => ui_get_full_url('ajax.php'), 'dashboardId' => $dashboardId, ] ); $slides['text'] .= ')\'>'; $slides['text'] .= html_print_image( 'images/images.png', true, [ 'title' => __('Slides mode'), 'class' => 'invert_filter', ] ); $slides['text'] .= ''; // Public Url. $queryPublic = [ 'dashboardId' => $dashboardId, 'hash' => $hash, 'id_user' => $config['id_user'], 'pure' => 1, ]; $publicUrl = ui_get_full_url( 'operation/dashboard/public_dashboard.php?'.http_build_query($queryPublic) ); $publiclink['text'] = ''; $publiclink['text'] .= html_print_image( 'images/camera_mc.png', true, [ 'title' => __('Show link to public dashboard'), 'class' => 'invert_filter', ] ); $publiclink['text'] .= ''; // Refresh selector time dashboards. if (isset($config['public_dashboard']) === true && (bool) $config['public_dashboard'] === true ) { $urlRefresh = $publicUrl; } else { $queryRefresh = [ 'dashboardId' => $dashboardId, 'pure' => 1, ]; $urlRefresh = $url.'&'.http_build_query($queryRefresh); } $comboRefreshCountdown['text'] = '
'; $comboRefresh['text'] = ''; // Select all dashboard view user. $queryCombo = [ 'pure' => $config['pure'], ]; $urlCombo = $url.'&'.http_build_query($queryCombo); $combo_dashboard['text'] = ''; // Edit mode. $enable_disable['text'] = html_print_checkbox_switch( 'edit-mode', 1, false, true ); // New Widget. $newWidget['text'] = ''; $newWidget['text'] .= html_print_image( 'images/add.png', true, [ 'title' => __('Add Cell'), 'class' => 'invert_filter', ] ); $newWidget['text'] .= ''; if (isset($config['public_dashboard']) === true && (bool) $config['public_dashboard'] === true ) { $buttons = [ 'combo_refresh_one_dashboard' => $comboRefresh, 'combo_refresh_countdown' => $comboRefreshCountdown, ]; } else if ($config['pure']) { if (check_acl_restricted_all($config['id_user'], $dashboardGroup, 'RW') === 0) { $buttons = [ 'back_to_dashboard_list' => $back_to_dashboard_list, 'normalscreen' => $normalscreen, 'combo_refresh_one_dashboard' => $comboRefresh, 'slides' => $slides, 'combo_refresh_countdown' => $comboRefreshCountdown, ]; } else { if ($publicLink === true) { $buttons = [ 'combo_refresh_one_dashboard' => $comboRefresh, 'combo_refresh_countdown' => $comboRefreshCountdown, ]; } else { $buttons = [ 'back_to_dashboard_list' => $back_to_dashboard_list, 'save_layout' => $save_layout_dashboard, 'normalscreen' => $normalscreen, 'combo_refresh_one_dashboard' => $comboRefresh, 'slides' => $slides, 'options' => $options, 'combo_refresh_countdown' => $comboRefreshCountdown, ]; } } } else { if (check_acl_restricted_all($config['id_user'], $dashboardGroup, 'RW') === 0) { $buttons = [ 'back_to_dashboard_list' => $back_to_dashboard_list, 'fullscreen' => $fullscreen, 'slides' => $slides, 'public_link' => $publiclink, 'combo_dashboard' => $combo_dashboard, 'newWidget' => $newWidget, ]; } else { $buttons = [ 'enable_disable' => $enable_disable, 'back_to_dashboard_list' => $back_to_dashboard_list, 'fullscreen' => $fullscreen, 'slides' => $slides, 'public_link' => $publiclink, 'combo_dashboard' => $combo_dashboard, 'options' => $options, 'newWidget' => $newWidget, ]; } } if ($publicLink === false) { if ((bool) is_metaconsole() === true) { ui_meta_print_header( __('Dashboards').' ยป '.__('List'), false, $buttons ); } else { ui_print_page_header( $dashboardName, '', false, '', false, $buttons ); } } else { $output = '