コード例 #1
0
ファイル: utils.php プロジェクト: pikkoui/suitecrm
/**
 * Function to grab the correct icon image for Dashlets Dialog
 * @param string $filename Location of the icon file
 * @param string $module Name of the module to fall back onto if file does not exist
 * @param string $width Width of image
 * @param string $height Height of image
 * @param string $align Alignment of image
 * @param string $alt Alt tag of image
 * @return string $string <img> tag with corresponding image
 */
function get_dashlets_dialog_icon($module = '', $width = '32', $height = '32', $align = 'absmiddle', $alt = '')
{
    global $app_strings, $theme;
    $iconName = _getIcon($module . "_32");
    if (empty($iconName)) {
        $iconName = _getIcon($module);
    }
    if (empty($iconName)) {
        return $app_strings['LBL_NO_IMAGE'];
    }
    return SugarThemeRegistry::current()->getImage($iconName, "align=\"{$align}\" border=\"0\"", $width, $height);
}
コード例 #2
0
ファイル: utils.php プロジェクト: razorinc/sugarcrm-example
/**
 * Function to grab the correct icon image for Dashlets Dialog
 * @param string $filename Location of the icon file
 * @param string $module Name of the module to fall back onto if file does not exist
 * @param string $width Width of image
 * @param string $height Height of image
 * @param string $align Alignment of image
 * @return string $string <img> tag with corresponding image
 */
function get_dashlets_dialog_icon($module = '', $width = '32', $height = '32', $align = 'absmiddle')
{
    global $app_strings, $theme;
    $icon_path = _getIcon($module . "_32");
    if (empty($icon_path)) {
        $icon_path = _getIcon($module);
    }
    if (empty($icon_path)) {
        $icon = $app_strings['LBL_NO_IMAGE'];
    } else {
        $icon = '<img border="0" src="' . $icon_path . '" width="' . $width . '" height="' . $height . '" align="' . $align . '">';
    }
    return $icon;
}
コード例 #3
0
			array_push($buttons, array('name'=>$app_list_strings['moduleList'][$tabModuleKey], 'img'=> SugarThemeRegistry::current()->getImageURL("icon_".$tabModuleKey."_32.gif"), 'key'=>$tabModuleKey));
		else
			array_push($buttons, array('name'=>$app_list_strings['moduleList'][$tabModuleKey], 'img'=> SugarThemeRegistry::current()->getImageURL("icon_A1_newmod.gif"),'alt'=> $mod_strings['LBL_NO_IMAGE'], 'key'=>$tabModuleKey));
		$ACLAllowedModulesAdded[$tabModuleKey] = 1;
	}
}
*/
// Add the remaining modules.
foreach ($ACLAllowedModules as $module => $singular) {
    $fullModuleList = array_merge($GLOBALS['moduleList'], $GLOBALS['modInvisList']);
    if ($module == 'Currencies' || !isset($app_list_strings['moduleList'][$module]) && !in_array($module, $fullModuleList)) {
        continue;
    }
    $icon_name = _getIcon($module . "_32");
    if (empty($icon_name)) {
        $icon_name = _getIcon($module);
    }
    if (empty($icon_name)) {
        $icon_name = "icon_A1_newmod.gif";
    }
    $buttons[] = array('name' => $app_list_strings['moduleList'][$module], 'img' => $icon_name, 'key' => $module);
}
$user_array = get_user_array(FALSE);
$sugar_smarty->assign("MOD", $mod_strings);
$sugar_smarty->assign("APP", $app_strings);
$sugar_smarty->assign("LANG", $current_language);
$sugar_smarty->assign("ACLAllowedModules", $ACLAllowedModules);
$sugar_smarty->assign("USER_ID_MD5", md5($current_user->id));
$sugar_smarty->assign("ENTROPY", mt_rand());
$sugar_smarty->assign("BUTTONS", $buttons);
$sugar_smarty->assign("IS_ADMIN", $current_user->is_admin);