function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('lbl_campaign_name', translate('LBL_TOP_CAMPAIGNS_NAME', 'Campaigns'));
     $ss->assign('lbl_revenue', translate('LBL_TOP_CAMPAIGNS_REVENUE', 'Campaigns'));
     $ss->assign('top_campaigns', $this->top_campaigns);
     return parent::display() . $ss->fetch('modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl');
 }
 function display()
 {
     global $current_language;
     if (empty($this->container_id)) {
         $child_reports = ReportContainer::get_root_reports();
     } else {
         $container = new ReportContainer();
         $container->retrieve($this->container_id);
         $child_reports = $container->get_linked_beans("reports", "ZuckerReport");
     }
     $mod_strings = return_module_language($current_language, "ZuckerReports");
     require_once 'include/ListView/ListView.php';
     $lv = new ListView();
     $lv->initNewXTemplate('modules/ZuckerReportContainer/DetailView.html', $mod_strings);
     $lv->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path . 'delete_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_DELETE'] . '" border="0"'));
     $lv->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path . 'edit_inline.png', 'align="absmiddle" alt="' . $app_strings['LNK_EDIT'] . '" border="0"'));
     $lv->xTemplateAssign("RETURN_URL", "&return_module=ZuckerReportContainer&return_action=DetailView&return_id=" . $container->id);
     $lv->setHeaderTitle("");
     $lv->setHeaderText("");
     ob_start();
     $lv->processListViewTwo($child_reports, "reports", "REPORT");
     $str = ob_get_clean();
     ob_end_flush();
     return parent::display() . $str;
 }
 function display()
 {
     ob_start();
     if (isset($GLOBALS['cal_strings'])) {
         return parent::display() . "Only one Calendar dashlet is allowed.";
     }
     require_once 'modules/Calendar/Calendar.php';
     require_once 'modules/Calendar/CalendarDisplay.php';
     require_once "modules/Calendar/CalendarGrid.php";
     global $cal_strings, $current_language;
     $cal_strings = return_module_language($current_language, 'Calendar');
     if (!ACLController::checkAccess('Calendar', 'list', true)) {
         ACLController::displayNoAccess(true);
     }
     $cal = new Calendar($this->view);
     $cal->dashlet = true;
     $cal->add_activities($GLOBALS['current_user']);
     $cal->load_activities();
     $display = new CalendarDisplay($cal, $this->id);
     $display->display_calendar_header(false);
     $display->display();
     $str = ob_get_contents();
     ob_end_clean();
     return parent::display() . $str;
 }
 /**
  * Displays the dashlet
  * 
  * @return string html to display dashlet
  */
 function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('id', $this->id);
     $ss->assign('height', $this->height);
     $str = $ss->fetch('modules/Home/Dashlets/InvadersDashlet/InvadersDashlet.tpl');
     return parent::display($this->dashletStrings['LBL_DBLCLICK_HELP']) . $str . '<br />';
     // return parent::display for title and such
 }
 /**
  * @see Dashlet::display()
  */
 public function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('lblTotalOpportunities', translate('LBL_TOTAL_OPPORTUNITIES', 'Opportunities'));
     $ss->assign('lblClosedWonOpportunities', translate('LBL_CLOSED_WON_OPPORTUNITIES', 'Opportunities'));
     $ss->assign('total_opportunities', $this->total_opportunities);
     $ss->assign('total_opportunities_won', $this->total_opportunities_won);
     return parent::display() . $ss->fetch('modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl');
 }
Beispiel #6
0
 /**
  * Displays the dashlet
  *
  * @return string html to display dashlet
  */
 function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('savedText', SugarCleaner::cleanHtml($this->savedText));
     $ss->assign('saving', $this->dashletStrings['LBL_SAVING']);
     $ss->assign('saved', $this->dashletStrings['LBL_SAVED']);
     $ss->assign('id', $this->id);
     $ss->assign('height', $this->height);
     $str = $ss->fetch('modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.tpl');
     return parent::display($this->dashletStrings['LBL_DBLCLICK_HELP']) . $str . '<br />';
     // return parent::display for title and such
 }
 /**
  * Displays the dashlet
  *
  * @return string html to display dashlet
  */
 function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('savedText', $this->savedText);
     $ss->assign('saving', $this->dashletStrings['LBL_SAVING']);
     $ss->assign('saved', $this->dashletStrings['LBL_SAVED']);
     $ss->assign('id', $this->id);
     $ss->assign('height', $this->height);
     $str = $ss->fetch('modules/Trackers/Dashlets/TrackerDashlet/TrackerDashlet.tpl');
     return parent::display() . $str . '<br />';
     // return parent::display for title and such
 }
Beispiel #8
0
 /**
  * Displays the dashlet
  *
  * @return string html to display dashlet
  */
 public function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('saving', $this->dashletStrings['LBL_SAVING']);
     $ss->assign('saved', $this->dashletStrings['LBL_SAVED']);
     $ss->assign('id', $this->id);
     $ss->assign('height', $this->height);
     $ss->assign('rss_output', $this->getRSSOutput($this->url));
     $str = $ss->fetch('modules/Home/Dashlets/RSSDashlet/RSSDashlet.tpl');
     return parent::display($this->dashletStrings['LBL_DBLCLICK_HELP']) . $str;
     // return parent::display for title and such
 }
 function display()
 {
     global $current_language;
     if (!empty($this->runnable_id)) {
         $seed = new RunnableReport();
         $bean = $seed->retrieve($this->runnable_id);
         $str = $bean->run_inline();
         $this->title = $bean->name;
     } else {
         $this->title = $this->dashletStrings['LBL_NOTITLE'];
     }
     return parent::display() . $str;
 }
 public function display()
 {
     $data = array();
     $ss = new Sugar_Smarty();
     $focus = BeanFactory::getBean('TeamNotices');
     $today = db_convert("'" . TimeDate::getInstance()->nowDbDate() . "'", 'date');
     $query = $focus->create_new_list_query("date_start", $focus->table_name . ".date_start <= {$today} and " . $focus->table_name . ".date_end >= {$today} and " . $focus->table_name . '.status=\'Visible\'');
     if ($result = $focus->db->query($query)) {
         while ($row = $focus->db->fetchByAssoc($result)) {
             $data[] = $row;
         }
     }
     $ss->assign("data", $data);
     return parent::display() . $ss->fetch('modules/TeamNotices/Dashlets/TeamNoticesDashlet/TeamNoticesDashlet.tpl');
 }
Beispiel #11
0
 function display()
 {
     $sugar_edition = 'COM';
     $out_url = str_replace(array('@@LANG@@', '@@VER@@', '@@EDITION@@'), array($GLOBALS['current_language'], $GLOBALS['sugar_config']['sugar_version'], $sugar_edition), $this->url);
     return parent::display() . "<iframe class='teamNoticeBox' src='" . $out_url . "' height='" . $this->height . "px'></iframe>";
 }
Beispiel #12
0
 /**
  * Displays the dashlet
  * 
  * @return string html to display dashlet
  */
 function display()
 {
     require_once "modules/Reports/Report.php";
     //		ini_set('display_errors', 'false');
     $chartReport = new SavedReport();
     $chartExists = $chartReport->retrieve($this->report_id, false);
     if (!is_null($chartExists)) {
         $this->title = $chartReport->name;
         $reporter = new Report($chartReport->content);
         $reporter->is_saved_report = true;
         $reporter->saved_report_id = $chartReport->id;
         $reporter->get_total_header_row();
         $reporter->run_chart_queries();
         require_once "modules/Reports/templates/templates_chart.php";
         ob_start();
         template_chart($reporter, true, true, $this->id);
         $str = ob_get_contents();
         ob_end_clean();
         $xmlFile = get_cache_file_name($reporter);
         $html = parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
         $ss = new Sugar_Smarty();
         $ss->assign('chartName', $this->id);
         $ss->assign('chartXMLFile', $xmlFile);
         $script = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl');
         $json = getJSONobj();
         return parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
     }
 }
Beispiel #13
0
 function display()
 {
     $sugar_edition = 'PRO';
     $sugar_edition = 'ENT';
     $out_url = str_replace(array('@@LANG@@', '@@VER@@', '@@EDITION@@'), array($GLOBALS['current_language'], $GLOBALS['sugar_config']['sugar_version'], $sugar_edition), $this->url);
     $title = $this->title;
     if (empty($title)) {
         $title = 'empty';
     }
     return parent::display() . "<iframe class='teamNoticeBox' title='{$title}' src='{$out_url}' height='{$this->height}px'></iframe>";
 }
Beispiel #14
0
 public function testDisplayReturnsNothing()
 {
     $dashlet = new Dashlet('unit_test_run');
     $this->assertEmpty($dashlet->display('foo'));
 }
Beispiel #15
0
 /**
  * Displays the Dashlet, must call process() prior to calling this
  *
  * @return string HTML that displays Dashlet
  */
 function display()
 {
     return parent::display() . $this->lvs->display(false) . $this->processAutoRefresh();
 }
 /**
  * Displays the Dashlet, must call process() prior to calling this
  *
  * @return string HTML that displays Dashlet
  */
 public function display()
 {
     return parent::display() . $this->processAutoRefresh();
 }
 /**
  * Displays the Dashlet, must call process() prior to calling this
  * 
  * @return string HTML that displays Dashlet 
  */
 function display()
 {
     return parent::display() . $this->lvs->display(false);
 }
Beispiel #18
0
 /**
  * Displays the dashlet
  * 
  * @return string html to display dashlet
  */
 function display()
 {
     $ss = new Sugar_Smarty();
     $xss = clean_xss($this->savedText, false);
     if (!empty($xss)) {
         $this->savedText = str_replace($xss, "", $this->savedText);
     }
     $ss->assign('savedText', $this->savedText);
     $ss->assign('saving', $this->dashletStrings['LBL_SAVING']);
     $ss->assign('saved', $this->dashletStrings['LBL_SAVED']);
     $ss->assign('id', $this->id);
     $ss->assign('height', $this->height);
     $str = $ss->fetch('modules/Home/Dashlets/JotPadDashlet/JotPadDashlet.tpl');
     return parent::display($this->dashletStrings['LBL_DBLCLICK_HELP']) . $str . '<br />';
     // return parent::display for title and such
 }
Beispiel #19
0
 function display()
 {
     $sugar_edition = 'COM';
     $out_url = str_replace(array('@@LANG@@', '@@VER@@', '@@EDITION@@'), array($GLOBALS['current_language'], $GLOBALS['sugar_config']['sugar_version'], $sugar_edition), $this->url);
     $title = $this->title;
     if (empty($title)) {
         $title = 'empty';
     }
     $result = parent::display();
     if ($this->checkURL()) {
         $result .= "<iframe class='teamNoticeBox' title='{$title}' src='{$out_url}' height='{$this->height}px'></iframe>";
     } else {
         $result .= '<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view"><tr height="20"><td colspan="11"><em>' . translate('LBL_DASHLET_INCORRECT_URL', 'Home') . '</em></td></tr></table>';
     }
     return $result;
 }
Beispiel #20
0
 /**
  * Displays the dashlet.
  *
  * @return string html to display dashlet
  */
 public function display()
 {
     //As the dashlet may point to a pivot that has been marked as deleted, check this here
     if (is_null($this->spotId) || $this->spotId === '') {
         return parent::display('') . '<span style="margin-left:10px;" class="dashletAnalyticMessage">' . $this->dashletStrings['LBL_NO_SPOTS_SELECTED'] . '</span><br />';
         // return parent::display for title and such
     } else {
         if ($this->checkIfSpotHasBeenDeleted($this->spotId)) {
             return parent::display('') . '<span style="margin-left:10px;" class="dashletAnalyticMessage">' . $this->dashletStrings['LBL_SPOTS_POINTED_DELETED'] . '</span><br />';
             // return parent::display for title and such
         }
         $ss = new Sugar_Smarty();
         $ss->assign('id', $this->id);
         $ss->assign('showUI', $this->showGui);
         $ss->assign('spotToLoad', $this->spotId);
         $spot = BeanFactory::getBean('Spots', $this->spotId);
         $ss->assign('config', $spot->config);
         $ss->assign('type', $spot->type);
         $str = $ss->fetch('modules/Spots/Dashlets/SpotsDashlet/SpotsDashlet.tpl');
         return parent::display() . $str . '<br />';
         // return parent::display for title and such
     }
 }
 function display()
 {
     global $app_list_strings, $current_language, $sugar_config, $currentModule, $action, $current_user, $theme, $timedate, $image_path;
     $this->loadLanguage('MyPipelineBySalesStageDashlet', 'modules/Charts/Dashlets/');
     $returnStr = '';
     $user_dateFormat = $timedate->get_date_format();
     $current_module_strings = return_module_language($current_language, 'Charts');
     if (isset($_REQUEST['mypbss_refresh'])) {
         $refresh = $_REQUEST['mypbss_refresh'];
     } else {
         $refresh = false;
     }
     $date_start = $this->mypbss_date_start;
     $date_end = $this->mypbss_date_end;
     // cn: format date_start|end to user's preferred
     $dateStartDisplay = strftime($timedate->get_user_date_format(), strtotime($date_start));
     $dateEndDisplay = strftime($timedate->get_user_date_format(), strtotime($date_end));
     $seps = array("-", "/");
     $dates = array($date_start, $date_end);
     $dateFileNameSafe = str_replace($seps, "_", $dates);
     $dateXml[0] = $timedate->swap_formats($date_start, $user_dateFormat, $timedate->dbDayFormat);
     $dateXml[1] = $timedate->swap_formats($date_end, $user_dateFormat, $timedate->dbDayFormat);
     $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']);
     }
     $GLOBALS['log']->debug("datax is:");
     $GLOBALS['log']->debug($datax);
     $ids = array($current_user->id);
     //create unique prefix based on selected users for image files
     $id_hash = '1';
     if (isset($ids)) {
         sort($ids);
         $id_hash = crc32(implode('', $ids));
         if ($id_hash < 0) {
             $id_hash = $id_hash * -1;
         }
     }
     $GLOBALS['log']->debug("ids is:");
     $GLOBALS['log']->debug($ids);
     $id_md5 = substr(md5($current_user->id), 0, 9);
     $seps = array("-", "/");
     $dates = array($dateStartDisplay, $dateEndDisplay);
     $dateFileNameSafe = str_replace($seps, "_", $dates);
     $cache_file_name = $current_user->getUserPrivGuid() . "_" . $theme . "_my_pipeline_" . $dateFileNameSafe[0] . "_" . $dateFileNameSafe[1] . ".xml";
     $GLOBALS['log']->debug("cache file name is: {$cache_file_name}");
     //        echo get_form_header($mod_strings['LBL_PIPELINE_FORM_TITLE'], $tools , false);
     $returnStr .= "<p align='center'>" . $this->gen_xml_pipeline_by_sales_stage($datax, $dateXml[0], $dateXml[1], $ids, $sugar_config['tmp_dir'] . $cache_file_name, $refresh, 'hBarS', $current_module_strings) . "</p>";
     $returnStr .= "<P align='center'><span class='chartFootnote'>" . $current_module_strings['LBL_PIPELINE_FORM_TITLE_DESC'] . "</span></P>";
     if (file_exists($sugar_config['tmp_dir'] . $cache_file_name)) {
         $file_date = date($timedate->get_date_format() . " " . $timedate->get_time_format(), filemtime($sugar_config['tmp_dir'] . $cache_file_name));
     } else {
         $file_date = '';
     }
     $returnStr .= "<span class='chartFootnote'>\n            <p align='right'><i>{$current_module_strings['LBL_CREATED_ON']} {$file_date}</i></p>\n            </span>";
     $returnStr .= get_validate_chart_js();
     return parent::display('<div align="center"><a href="#" onclick="SUGAR.sugarHome.retrieveDashlet(\'' . $this->id . '\', \'index.php?action=DisplayDashlet&module=Home&to_pdf=1&mypbss_refresh=true&id=' . $this->id . '\'); return false"; class="chartToolsLink">' . $this->dashletStrings['LBL_REFRESH'] . '</a></div>') . $returnStr;
 }
Beispiel #22
-1
 /**
  * Displays the dashlet
  *
  * @return string html to display dashlet
  */
 function display()
 {
     require_once "modules/Reports/Report.php";
     $chartReport = BeanFactory::getBean('Reports', $this->report_id, array('encode' => false, 'strict_retrieve' => true));
     if (!empty($chartReport)) {
         $title = getReportNameTranslation($chartReport->name);
         $this->title = $title;
         $reporter = new Report($chartReport->content);
         $reporter->is_saved_report = true;
         $reporter->saved_report_id = $chartReport->id;
         $reporter->get_total_header_row();
         $reporter->run_chart_queries();
         ob_start();
         require_once "include/SugarCharts/ChartDisplay.php";
         $chartDisplay = new ChartDisplay();
         $chartDisplay->setReporter($reporter);
         echo $chartDisplay->legacyDisplay($this->id, true);
         $str = ob_get_contents();
         ob_end_clean();
         $xmlFile = $chartDisplay->get_cache_file_name($reporter);
         $html = parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
         $ss = new Sugar_Smarty();
         $ss->assign('chartName', $this->id);
         $ss->assign('chartXMLFile', $xmlFile);
         $script = $ss->fetch('modules/Home/Dashlets/ChartsDashlet/ChartsDashletScript.tpl');
         $json = getJSONobj();
         return parent::display() . "<div align='center'>" . $str . "</div>" . "<br />";
         // return parent::display for title and such
     }
 }