Example #1
0
 function getBreadCrumb()
 {
     $crumbs = '';
     $actions = array();
     $count = 0;
     foreach ($this->crumbs as $name => $action) {
         if ($name == 'Home') {
             $crumbs .= "<a onclick='{$action}' href='javascript:void(0)'>" . getStudioIcon('home', 'home', 16, 16) . '</a>';
         } else {
             if ($name == 'Assistant') {
                 $crumbs .= "<a id='showassist' onclick='{$action}' href='javascript:void(0)'>" . getStudioIcon('assistant', 'assistant', 16, 16) . '</a>';
             } else {
                 if ($count > 0) {
                     $crumbs .= '&nbsp;>&nbsp;';
                 } else {
                     $crumbs .= '&nbsp;|&nbsp;';
                 }
                 if (empty($action)) {
                     $crumbs .= "<span class='crumbLink'>{$name}</span>";
                     $actions[] = "";
                 } else {
                     $crumbs .= "<a href='javascript:void(0);' onclick='{$action}' class='crumbLink'>{$name}</a>";
                     $actions[] = $action;
                 }
                 $count++;
             }
         }
     }
     if ($count > 1 && $actions[$count - 2] != "") {
         $crumbs = "<a onclick='{$actions[$count - 2]}' href='javascript:void(0)'>" . getStudioIcon('back', 'back', 16, 16) . '</a>&nbsp;' . $crumbs;
     }
     return $crumbs . '<br><br>';
 }
 /**
  * @see SearchForm::setup()
  */
 function setup()
 {
     parent::setup();
     $this->xtpl->assign('LOADING_IMAGE', getStudioIcon('loading', 'loading', 16, 16));
     $this->xtpl->assign('HELP_IMAGE', SugarThemeRegistry::current()->getImageURL('help-dashlet.gif'));
     $this->xtpl->assign('CLOSE_IMAGE', SugarThemeRegistry::current()->getImageURL('close.gif'));
 }
function smarty_function_sugar_image($params, &$smarty)
{
    if (!isset($params['name'])) {
        $smarty->trigger_error("sugar_field: missing 'name' parameter");
        return;
    }
    $height = !empty($params['height']) ? $params['height'] : '48';
    $width = !empty($params['width']) ? $params['width'] : '48';
    $image = !empty($params['image']) ? $params['image'] : $params['name'];
    $altimage = !empty($params['altimage']) ? $params['altimage'] : $params['name'];
    return getStudioIcon($image, $altimage, $height, $width);
}