function displayOptions() { global $app_strings, $mod_strings; $ss = new Sugar_Smarty(); $ss->assign('MOD', $this->dashletStrings); $ss->assign('title', $this->title); $ss->assign('view', $this->view); $ss->assign('id', $this->id); return parent::displayOptions() . $ss->fetch('modules/Calendar/Dashlets/CalendarDashlet/CalendarDashletOptions.tpl'); }
function displayOptions() { global $app_strings; $ss = new Sugar_Smarty(); $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']); $ss->assign('countLbl', $this->dashletStrings['LBL_CONFIGURE_COUNT']); $ss->assign('containerLbl', $this->dashletStrings['LBL_CONFIGURE_CONTAINER']); $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']); $ss->assign('title', $this->title); $container = ReportContainer::get_category_select_options(); asort($container); $ss->assign('containerSelect', get_select_options_with_id($container, $this->container_id)); $ss->assign('count', $this->count); $ss->assign('id', $this->id); return parent::displayOptions() . $ss->fetch('modules/ZuckerReports/Dashlets/ZuckerReportContainerDashlet/ZuckerReportContainerDashletOptions.tpl'); }
function displayOptions() { global $app_strings; $seed = new RunnableReport(); $list = $seed->get_full_list("name", "report_result_type='INLINE'"); $select = array(); if (!empty($list)) { foreach ($list as $bean) { $select[$bean->id] = $bean->get_summary_text(); } } asort($select); $ss = new Sugar_Smarty(); $ss->assign('runnableLbl', $this->dashletStrings['LBL_CONFIGURE_RUNNABLE']); $ss->assign('runnableSelect', get_select_options_with_id($select, $this->runnable_id)); $ss->assign('id', $this->id); return parent::displayOptions() . $ss->fetch('modules/ZuckerReports/Dashlets/ZuckerReportDisplayDashlet/ZuckerReportDisplayDashletOptions.tpl'); }
/** * Displays the configuration form for the dashlet * * @return string html to display form */ public function displayOptions() { global $app_strings; $ss = new Sugar_Smarty(); $this->dashletStrings['LBL_SAVE'] = $app_strings['LBL_SAVE_BUTTON_LABEL']; $ss->assign('lang', $this->dashletStrings); $ss->assign('id', $this->id); $ss->assign('title', $this->title); $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']); if ($this->isAutoRefreshable()) { $ss->assign('isRefreshable', true); $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); $ss->assign('autoRefreshSelect', $this->autoRefresh); } $str = $ss->fetch('modules/SugarFavorites/Dashlets/SugarFavoritesDashlet/SugarFavoritesDashletOptions.tpl'); return Dashlet::displayOptions() . $str; }
/** * Displays the configuration form for the dashlet * * @return string html to display form */ function displayOptions() { global $app_strings; $ss = new Sugar_Smarty(); $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']); $ss->assign('heightLbl', $this->dashletStrings['LBL_CONFIGURE_HEIGHT']); $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']); $ss->assign('title', $this->title); $ss->assign('height', $this->height); $ss->assign('id', $this->id); return parent::displayOptions() . $ss->fetch('modules/Home/Dashlets/InvadersDashlet/InvadersOptions.tpl'); }
/** * Displays the configuration form for the dashlet * * @return string html to display form */ public function displayOptions() { global $app_strings, $sugar_version, $sugar_config; $ss = new Sugar_Smarty(); $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']); $ss->assign('heightLbl', $this->dashletStrings['LBL_CONFIGURE_HEIGHT']); $ss->assign('rssUrlLbl', $this->dashletStrings['LBL_CONFIGURE_RSSURL']); $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']); $ss->assign('title', $this->title); $ss->assign('height', $this->height); $ss->assign('url', $this->url); $ss->assign('id', $this->id); return parent::displayOptions() . $ss->fetch('modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl'); }
/** * Displays the options for this Dashlet * * @return string HTML that shows options */ function displayOptions() { $this->processDisplayOptions(); return parent::displayOptions() . $this->configureSS->fetch($this->configureTpl); }
/** * Handles displaying the chart dashlet configuration popup window * * @return string HTML to return to the browser */ public function displayOptions() { $currentSearchFields = array(); if (is_array($this->_searchFields)) { foreach ($this->_searchFields as $name => $params) { if (!empty($name)) { $name = strtolower($name); $currentSearchFields[$name] = array(); $widgetDef = $params; if (isset($this->getSeedBean()->field_defs[$name])) { $widgetDef = $this->getSeedBean()->field_defs[$name]; } if ($widgetDef['type'] == 'enum' || $widgetDef['type'] == 'singleenum') { $widgetDef['remove_blank'] = true; } // remove the blank option for the dropdown if (empty($widgetDef['input_name0'])) { $widgetDef['input_name0'] = empty($this->{$name}) ? '' : $this->{$name}; } $currentSearchFields[$name]['label'] = translate($widgetDef['vname'], $this->getSeedBean()->module_dir); if ($currentSearchFields[$name]['label'] == $widgetDef['vname']) { $currentSearchFields[$name]['label'] = translate($widgetDef['vname'], 'Charts'); } $currentSearchFields[$name]['input'] = $this->layoutManager->widgetDisplayInput($widgetDef, true, empty($this->{$name}) ? '' : $this->{$name}); } else { // ability to create spacers in input fields $currentSearchFields['blank' + $count]['label'] = ''; $currentSearchFields['blank' + $count]['input'] = ''; $count++; } } } $this->currentSearchFields = $currentSearchFields; $this->getConfigureSmartyInstance()->assign('title', translate('LBL_TITLE', 'Charts')); $this->getConfigureSmartyInstance()->assign('save', $GLOBALS['app_strings']['LBL_SAVE_BUTTON_LABEL']); $this->getConfigureSmartyInstance()->assign('clear', $GLOBALS['app_strings']['LBL_CLEAR_BUTTON_LABEL']); $this->getConfigureSmartyInstance()->assign('id', $this->id); $this->getConfigureSmartyInstance()->assign('searchFields', $this->currentSearchFields); $this->getConfigureSmartyInstance()->assign('dashletTitle', $this->title); $this->getConfigureSmartyInstance()->assign('dashletType', 'predefined_chart'); $this->getConfigureSmartyInstance()->assign('module', $_REQUEST['module']); $this->getConfigureSmartyInstance()->assign('showClearButton', $this->isConfigPanelClearShown); if ($this->isAutoRefreshable()) { $this->getConfigureSmartyInstance()->assign('isRefreshable', true); $this->getConfigureSmartyInstance()->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); $this->getConfigureSmartyInstance()->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); $this->getConfigureSmartyInstance()->assign('autoRefreshSelect', $this->autoRefresh); } return parent::displayOptions() . $this->getConfigureSmartyInstance()->fetch($this->_configureTpl); }
function displayOptions() { global $timedate, $image_path, $app_strings, $current_user, $app_list_strings; $ss = new Sugar_Smarty(); $ss->assign('id', $this->id); $ss->assign('module', $_REQUEST['module']); $ss->assign('dashletType', 'predefined_chart'); $ss->assign('LBL_TITLE', translate('LBL_TITLE', 'Charts')); $ss->assign('LBL_CHART_TYPE', translate('LBL_CHART_TYPE', 'Charts')); $ss->assign('LBL_DATE_START', translate('LBL_DATE_START', 'Charts')); $ss->assign('LBL_DATE_END', translate('LBL_DATE_END', 'Charts')); $ss->assign('LBL_LEAD_STATUS', translate('LBL_LEAD_STATUS', 'Charts')); $ss->assign('LBL_ENTER_DATE', translate('LBL_ENTER_DATE', 'Charts')); $ss->assign('LBL_SELECT_BUTTON_TITLE', $app_strings['LBL_SELECT_BUTTON_TITLE']); $ss->assign('image_path', $image_path); //get the dates to display $date_start = $this->myleadschart_date_start; $date_end = $this->myleadschart_date_end; $timeFormat = $current_user->getUserDateTimePreferences(); $ss->assign('date_start', $timedate->swap_formats($date_start, $timedate->dbDayFormat, $timeFormat['date'])); $ss->assign('date_end', $timedate->swap_formats($date_end, $timedate->dbDayFormat, $timeFormat['date'])); $tempx = array(); $datax = array(); $selected_datax = array(); //get list of lead status keys to display $user_status = $this->myleadschart_status; $tempx = $user_status; //set $datax using selected lead status keys if (count($tempx) > 0) { foreach ($tempx as $key) { $datax[$key] = $app_list_strings['lead_status_dom'][$key]; array_push($selected_datax, $key); } } else { $datax = $app_list_strings['lead_status_dom']; $selected_datax = array_keys($app_list_strings['lead_status_dom']); } $ss->assign('dashlet_title', $this->title); $ss->assign('selected_datax', get_select_options_with_id($app_list_strings['lead_status_dom'], $selected_datax)); $ss->assign('user_date_format', $timedate->get_user_date_format()); $ss->assign('cal_dateformat', $timedate->get_cal_date_format()); $ss->assign('module', $_REQUEST['module']); return parent::displayOptions() . $ss->fetch('custom/modules/Charts/Dashlets/MyLeadsByStatusDashlet/MyLeadsByStatusDashletConfigure.tpl'); }
/** * Displays the configuration form for the dashlet. * * @return string html to display form */ public function displayOptions() { global $app_strings; $ss = new Sugar_Smarty(); $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']); $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']); $ss->assign('spotToLoadTitleLbl', $this->dashletStrings['LBL_SPOTS_TO_LOAD']); $ss->assign('showUILbl', $this->dashletStrings['LBL_SHOW_UI']); $ss->assign('title', $this->title); $ss->assign('id', $this->id); $ss->assign('showUI', $this->showGui); $ss->assign('spotToLoad', $this->spotId); $ss->assign('spots', $this->getSpotsList()); return parent::displayOptions() . $ss->fetch('modules/Spots/Dashlets/SpotsDashlet/SpotsDashletOptions.tpl'); }
/** * Displays the configuration form for the dashlet * * @return string html to display form */ public function displayOptions() { global $app_strings, $sugar_version, $sugar_config; $ss = new Sugar_Smarty(); $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']); $ss->assign('heightLbl', $this->dashletStrings['LBL_CONFIGURE_HEIGHT']); $ss->assign('rssUrlLbl', $this->dashletStrings['LBL_CONFIGURE_RSSURL']); $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']); $ss->assign('title', $this->title); $ss->assign('height', $this->height); $ss->assign('url', $this->url); $ss->assign('id', $this->id); if ($this->isAutoRefreshable()) { $ss->assign('isRefreshable', true); $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); $ss->assign('autoRefreshSelect', $this->autoRefresh); } return parent::displayOptions() . $ss->fetch('modules/Home/Dashlets/RSSDashlet/RSSDashletOptions.tpl'); }
function displayOptions() { global $timedate, $image_path, $app_strings, $current_user, $app_list_strings; $ss = new Sugar_Smarty(); $ss->assign('id', $this->id); $ss->assign('LBL_DATE_START', translate('LBL_DATE_START', 'Charts')); $ss->assign('LBL_DATE_END', translate('LBL_DATE_END', 'Charts')); $ss->assign('LBL_SALES_STAGES', translate('LBL_SALES_STAGES', 'Charts')); $ss->assign('LBL_ENTER_DATE', translate('LBL_ENTER_DATE', 'Charts')); $ss->assign('LBL_SELECT_BUTTON_TITLE', $app_strings['LBL_SELECT_BUTTON_TITLE']); $ss->assign('image_path', $image_path); //get the dates to display $date_start = $this->mypbss_date_start; $date_end = $this->mypbss_date_end; $ss->assign('date_start', $date_start); $ss->assign('date_end', $date_end); $tempx = array(); $datax = array(); $selected_datax = array(); //get list of sales stage keys to display $user_sales_stage = $this->mypbss_sales_stages; $tempx = $user_sales_stage; //set $datax using selected sales stage keys if (count($tempx) > 0) { foreach ($tempx as $key) { $datax[$key] = $app_list_strings['sales_stage_dom'][$key]; array_push($selected_datax, $key); } } else { $datax = $app_list_strings['sales_stage_dom']; $selected_datax = array_keys($app_list_strings['sales_stage_dom']); } $ss->assign('selected_datax', get_select_options_with_id($app_list_strings['sales_stage_dom'], $selected_datax)); $ss->assign('user_date_format', $timedate->get_user_date_format()); $ss->assign('cal_dateformat', $timedate->get_cal_date_format()); return parent::displayOptions() . $ss->fetch('modules/Charts/Dashlets/MyPipelineBySalesStageDashlet/MyPipelineBySalesStageConfigure.tpl'); }
public function testDisplayOptionsDoesNothing() { $dashlet = new Dashlet('unit_test_run'); $this->assertNull($dashlet->displayOptions()); }
/** * Displays the configuration form for the dashlet * * @return string html to display form */ function displayOptions() { global $app_strings; $ss = new Sugar_Smarty(); $ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']); $ss->assign('heightLbl', $this->dashletStrings['LBL_CONFIGURE_HEIGHT']); $ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']); $ss->assign('clearLbl', $app_strings['LBL_CLEAR_BUTTON_LABEL']); $ss->assign('title', $this->title); $ss->assign('height', $this->height); $ss->assign('id', $this->id); if ($this->isAutoRefreshable()) { $ss->assign('isRefreshable', true); $ss->assign('autoRefresh', $GLOBALS['app_strings']['LBL_DASHLET_CONFIGURE_AUTOREFRESH']); $ss->assign('autoRefreshOptions', $this->getAutoRefreshOptions()); $ss->assign('autoRefreshSelect', $this->autoRefresh); } return parent::displayOptions() . $ss->fetch('modules/Trackers/Dashlets/TrackerDashlet/TrackerDashletOptions.tpl'); }